C# Class HandCoded.Xml.XPath

The XPath class contains utility functions for creating XPath location strings and applying simple XPath like operations to a DOM tree.
Mostrar archivo Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Methods

Method Description
CommonAncestor ( XmlElement elementA, XmlElement elementB ) : XmlNode

Determines the common ancestor of two XmlElement instances.

ForNode ( XmlNode node ) : string

Constructs an XPath expression that describes the location of the given XmlNode within its document tree.

Match ( XmlAttribute context, string attrName ) : bool

Determines of the context XmlAttribute matches the indicated named attribute.

Match ( XmlAttribute context, string name1, string attrName ) : bool

Determines of the context XmlAttribute matches the indicated named attribute and parent element name.

Match ( XmlAttribute context, string name1, string name2, string attrName ) : bool

Determines of the context XmlAttribute matches the indicated named attribute and ancestor element names.

Match ( XmlElement context, string name1 ) : bool

Determines of the context XmlElement matches the indicated element name.

Match ( XmlElement context, string name1, string name2 ) : bool

Determines of the context XmlElement matches the indicated element and parent.

Path ( XmlElement context, string name ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named child element. The '.' and '..' specifiers are supported.

Path ( XmlElement context, string name1, string name2 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named grandchild element.

Path ( XmlElement context, string name1, string name2, string name3 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-grandchild element.

Path ( XmlElement context, string name1, string name2, string name3, string name4 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-great-grandchild element.

Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.

Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.

Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.

Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7, string name8 ) : XmlElement

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.

Paths ( XmlElement context, string name ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named child elements. The '*', '.' and '..' specifiers are supported.

Paths ( XmlElement context, string name1, string name2 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3, string name4 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-great-grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.

Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7, string name8 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.

Paths ( XmlNodeList contexts, string name ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named child elements.

Paths ( XmlNodeList contexts, string name1, string name2 ) : XmlNodeList

Evaluates a simple multiple valued path access from the given context node to the named grandchild elements.

Private Methods

Method Description
XPath ( ) : System

Ensures no instances can be constructed.

Method Details

CommonAncestor() public static method

Determines the common ancestor of two XmlElement instances.
public static CommonAncestor ( XmlElement elementA, XmlElement elementB ) : XmlNode
elementA System.Xml.XmlElement The first element.
elementB System.Xml.XmlElement The second element.
return System.Xml.XmlNode

ForNode() public static method

Constructs an XPath expression that describes the location of the given XmlNode within its document tree.
public static ForNode ( XmlNode node ) : string
node System.Xml.XmlNode The to be described.
return string

Match() public static method

Determines of the context XmlAttribute matches the indicated named attribute.
public static Match ( XmlAttribute context, string attrName ) : bool
context System.Xml.XmlAttribute The context .
attrName string The target attribute name.
return bool

Match() public static method

Determines of the context XmlAttribute matches the indicated named attribute and parent element name.
public static Match ( XmlAttribute context, string name1, string attrName ) : bool
context System.Xml.XmlAttribute The context .
name1 string The name of the parent element.
attrName string The target attribute name.
return bool

Match() public static method

Determines of the context XmlAttribute matches the indicated named attribute and ancestor element names.
public static Match ( XmlAttribute context, string name1, string name2, string attrName ) : bool
context System.Xml.XmlAttribute The context .
name1 string The name of the grand-parent element.
name2 string The name of the parent element.
attrName string The target attribute name.
return bool

Match() public static method

Determines of the context XmlElement matches the indicated element name.
public static Match ( XmlElement context, string name1 ) : bool
context System.Xml.XmlElement The context .
name1 string The target element name.
return bool

Match() public static method

Determines of the context XmlElement matches the indicated element and parent.
public static Match ( XmlElement context, string name1, string name2 ) : bool
context System.Xml.XmlElement The context .
name1 string The parent element name.
name2 string The target element name.
return bool

Path() public static method

Evaluates a simple single valued path access from the given context node to the named child element. The '.' and '..' specifiers are supported.
public static Path ( XmlElement context, string name ) : XmlElement
context System.Xml.XmlElement The context .
name string The name of the required child.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named grandchild element.
public static Path ( XmlElement context, string name1, string name2 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3, string name4 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
name7 string The name of the required great-great-great-great-great-grandchild.
return System.Xml.XmlElement

Path() public static method

Evaluates a simple single valued path access from the given context node to the named great-great-great-grandchild element.
public static Path ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7, string name8 ) : XmlElement
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
name7 string The name of the required great-great-great-great-great-grandchild.
name8 string The name of the required great-great-great-great-great-great-grandchild.
return System.Xml.XmlElement

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named child elements. The '*', '.' and '..' specifiers are supported.
public static Paths ( XmlElement context, string name ) : XmlNodeList
context System.Xml.XmlElement The context .
name string The name of the required child.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named grandchild elements.
public static Paths ( XmlElement context, string name1, string name2 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3, string name4 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
name7 string The name of the required great-great-great-great-great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named great-great-great-great-grandchild elements.
public static Paths ( XmlElement context, string name1, string name2, string name3, string name4, string name5, string name6, string name7, string name8 ) : XmlNodeList
context System.Xml.XmlElement The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
name3 string The name of the required great-grandchild.
name4 string The name of the required great-great-grandchild.
name5 string The name of the required great-great-great-grandchild.
name6 string The name of the required great-great-great-great-grandchild.
name7 string The name of the required great-great-great-great-great-grandchild.
name8 string The name of the required great-great-great-great-great-great-grandchild.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named child elements.
public static Paths ( XmlNodeList contexts, string name ) : XmlNodeList
contexts System.Xml.XmlNodeList The context .
name string The name of the required child.
return System.Xml.XmlNodeList

Paths() public static method

Evaluates a simple multiple valued path access from the given context node to the named grandchild elements.
public static Paths ( XmlNodeList contexts, string name1, string name2 ) : XmlNodeList
contexts System.Xml.XmlNodeList The context .
name1 string The name of the required child.
name2 string The name of the required grandchild.
return System.Xml.XmlNodeList