IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.Xml Class Reference

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

Static Public Member Functions

static XmlNode RootNode (XmlNode node)
 Returns the root node of the document containtng the specified xml node. More...
 
static int ChildIndex (XmlNode node)
 Returns the index of the node among siblings with the same name. More...
 
static string XPath (XmlNode node, XmlNode basenode)
 Returns an XPath expression that uniquely specifies location of an XML node relative to a given ancestor. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

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

Member Function Documentation

static XmlNode IG.Lib.Xml.RootNode ( XmlNode  node)
inlinestatic

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)
inlinestatic

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 
)
inlinestatic

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 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetNodes().

static XmlNode IG.Lib.Xml.GetNode ( XmlNode  basenode,
string  xpath 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetNode().

static XmlElement [] IG.Lib.Xml.GetElements ( XmlNode  basenode,
string  xpath 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetElements().

static XmlElement IG.Lib.Xml.GetElement ( XmlNode  basenode,
string  xpath 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetElement().

static XmlNode IG.Lib.Xml.GetTextNode ( XmlNode  basenode,
string  xpath 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetTextNode().

static string IG.Lib.Xml.GetValue ( XmlNode  basenode,
string  xpath 
)
inlinestatic

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.

Referenced by IG.Lib.XmlData.GetValue().

static bool IG.Lib.Xml.CreateContainer ( XmlNode  basenode,
string  xpath,
string  ContainerAttribute,
string  ContainerValue 
)
inlinestatic
static bool IG.Lib.Xml.CreateTextNode ( XmlNode  basenode,
string  xpath,
string  ContainerAttribute,
string  ContainerValue,
string  NodeAttribute,
string  NodeValue 
)
inlinestatic
static bool IG.Lib.Xml.SetValue ( XmlNode  basenode,
string  xpath,
string  value,
bool  createnodes,
string  ContainerAttribute,
string  ContainerValue,
string  NodeAttribute,
string  NodeValue 
)
inlinestatic
static bool IG.Lib.Xml.SetValue ( XmlNode  basenode,
string  xpath,
string  value,
bool  createnodes 
)
inlinestatic
static bool IG.Lib.Xml.SetValue ( XmlNode  basenode,
string  xpath,
string  value 
)
inlinestatic

Member Data Documentation

const int IG.Lib.Xml.FirstChildIndex = 1

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


The documentation for this class was generated from the following file: