IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::Xml Class Reference

Supplemental basic XML node & document manipulation utilities. Contains some useful static methods for XML manipulation. More...

List of all members.

Static Public Member Functions

static XmlNode RootNode (XmlNode node)
 Returns the root node of the document containtng the specified xml node.
static int ChildIndex (XmlNode node)
 Returns the index of the node among siblings with the same name.
static string XPath (XmlNode node, XmlNode basenode)
 Returns an XPath expression that uniquely specifies location of an XML node relative to a given ancestor.
static XmlNodeList GetNodes (XmlNode basenode, string xpath)
 Returns a list of all _gridCoordinates in the XML sub-tree whose root is basenode that satisfy the specified XPath expression.
static XmlNode GetNode (XmlNode basenode, string xpath)
 Returns the first _gridCoordinates in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.
static XmlElement[] GetElements (XmlNode basenode, string xpath)
 Returns an array of all elements _gridCoordinates in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.
static XmlElement GetElement (XmlNode basenode, string xpath)
 Returns the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.
static XmlNode GetTextNode (XmlNode basenode, string xpath)
 Returns the (first) text node of the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.
static string GetValue (XmlNode basenode, string xpath)
 Returns value of the (first) text node of the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.
static bool CreateContainer (XmlNode basenode, string xpath, string ContainerAttribute, string ContainerValue)
static bool CreateTextNode (XmlNode basenode, string xpath, string ContainerAttribute, string ContainerValue, string NodeAttribute, string NodeValue)
static bool SetValue (XmlNode basenode, string xpath, string value, bool createnodes, string ContainerAttribute, string ContainerValue, string NodeAttribute, string NodeValue)
static bool SetValue (XmlNode basenode, string xpath, string value, bool createnodes)
static bool SetValue (XmlNode basenode, string xpath, string value)

Public Attributes

const int FirstChildIndex = 1
 Defines the index of the first child node as used in XPath expressions.

Detailed Description

Supplemental basic XML node & document manipulation utilities. Contains some useful static methods for XML manipulation.


Member Function Documentation

static XmlNode IG::Lib::Xml::RootNode ( XmlNode  node) [inline, static]

Returns the root node of the document containtng the specified xml node.

Parameters:
nodeNode whose containing document is queried for the root node.
Returns:
The root node of the document that contains the specified node.
static int IG::Lib::Xml::ChildIndex ( XmlNode  node) [inline, static]

Returns the index of the node among siblings with the same name.

Parameters:
nodeThe XML node whose index is returned.
Returns:
Index of the XML node in a collection of its sibling _gridCoordinates with the same name. Counting starts from Xml.FirstChildIndex. If node does not have a name (or it has an empty name) then node'result index among all siblings is returned.
static string IG::Lib::Xml::XPath ( XmlNode  node,
XmlNode  basenode 
) [inline, static]

Returns an XPath expression that uniquely specifies location of an XML node relative to a given ancestor.

Parameters:
nodeThe node whose XPath expressino is searched for.
basenodeThe node'result ancestor relative to which the XPath is specified. If null then the absolute path within containing outer-most node (or document) is returned. If not null then basenode must be an ancestor of the node.
Returns:
static XmlNodeList IG::Lib::Xml::GetNodes ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns a list of all _gridCoordinates in the XML sub-tree whose root is basenode that satisfy the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of _gridCoordinates.
Returns:
List of all _gridCoordinates that satisfy the XPath expression.
static XmlNode IG::Lib::Xml::GetNode ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns the first _gridCoordinates in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
static XmlElement [] IG::Lib::Xml::GetElements ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns an array of all elements _gridCoordinates in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
static XmlElement IG::Lib::Xml::GetElement ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
static XmlNode IG::Lib::Xml::GetTextNode ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns the (first) text node of the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
static string IG::Lib::Xml::GetValue ( XmlNode  basenode,
string  xpath 
) [inline, static]

Returns value of the (first) text node of the first ELEMENT node in the XML sub-tree whose root is basenode that satisfies the specified XPath expression.

Parameters:
basenodeRoot node of the XML sub-tree in which _gridCoordinates are searched for.
xpathThe XPath expression used for selection of the node.
Returns:
The first node that satisfies the XPath expression.
static bool IG::Lib::Xml::CreateContainer ( XmlNode  basenode,
string  xpath,
string  ContainerAttribute,
string  ContainerValue 
) [inline, static]
static bool IG::Lib::Xml::CreateTextNode ( XmlNode  basenode,
string  xpath,
string  ContainerAttribute,
string  ContainerValue,
string  NodeAttribute,
string  NodeValue 
) [inline, static]
static bool IG::Lib::Xml::SetValue ( XmlNode  basenode,
string  xpath,
string  value,
bool  createnodes,
string  ContainerAttribute,
string  ContainerValue,
string  NodeAttribute,
string  NodeValue 
) [inline, static]
static bool IG::Lib::Xml::SetValue ( XmlNode  basenode,
string  xpath,
string  value,
bool  createnodes 
) [inline, static]
static bool IG::Lib::Xml::SetValue ( XmlNode  basenode,
string  xpath,
string  value 
) [inline, static]

Member Data Documentation

Defines the index of the first child node as used in XPath expressions.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events