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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Static Public Member Functions | Public Attributes | List of all members
IG.Lib.Xml Class Reference

Supplemental basic XML node & 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 & 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

  node | Node 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

  node | The 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

  node | The node whose XPath expressino is searched for.
  basenode | The 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

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| inline static

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

Parameters

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| 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

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| inline static

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

Parameters

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| 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

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| 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

  basenode | Root node of the XML sub-tree in which _gridCoordinates are searched for.
  xpath | The 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
| ) |  |
| 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

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:

- igbase/0unsorted/XmlUtilities.cs