IXmlNodeSelector IXmlNodeSelector IXmlNodeSelector IXmlNodeSelector Interface

Definition

Encapsulates the methods needed to execute XPath queries on an XML DOM tree or subtree.

public : interface IXmlNodeSelector
public interface IXmlNodeSelector
Public Interface IXmlNodeSelector
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

SelectNodes(String) SelectNodes(String) SelectNodes(String) SelectNodes(String)

Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList.

public : XmlNodeList SelectNodes(Platform::String xpath)
public XmlNodeList SelectNodes(String xpath)
Public Function SelectNodes(xpath As String) As XmlNodeList
var xmlNodeList = iXmlNodeSelector.selectNodes(xpath);
Parameters
xpath
Platform::String String String String

Specifies an XPath expression.

Returns

The collection of nodes selected by applying the given pattern-matching operation. If no nodes are selected, this method returns an empty collection.

SelectNodesNS(String, Object) SelectNodesNS(String, Object) SelectNodesNS(String, Object) SelectNodesNS(String, Object)

Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList.

public : XmlNodeList SelectNodesNS(Platform::String xpath, Platform::Object namespaces)
public XmlNodeList SelectNodesNS(String xpath, Object namespaces)
Public Function SelectNodesNS(xpath As String, namespaces As Object) As XmlNodeList
var xmlNodeList = iXmlNodeSelector.selectNodesNS(xpath, namespaces);
Parameters
xpath
Platform::String String String String

Specifies an XPath expresssion.

namespaces
Platform::Object Object Object Object

Contains a string that specifies namespaces for use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.

Returns

The collection of nodes selected by applying the given pattern-matching operation. If no nodes are selected, returns an empty collection.

Remarks

Prefixes in the query are resolved using the specified namespace declarations.

SelectSingleNode(String) SelectSingleNode(String) SelectSingleNode(String) SelectSingleNode(String)

Applies the specified pattern-matching operation to this node's context and returns the first matching node.

public : IXmlNode SelectSingleNode(Platform::String xpath)
public IXmlNode SelectSingleNode(String xpath)
Public Function SelectSingleNode(xpath As String) As IXmlNode
var iXmlNode = iXmlNodeSelector.selectSingleNode(xpath);
Parameters
xpath
Platform::String String String String

Specifies an XPath expression.

Returns

The first node that matches the given pattern-matching operation. If no nodes match the expression, the method returns a null value.

SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object)

Applies the specified pattern-matching operation to this node's context and returns the first matching node.

public : IXmlNode SelectSingleNodeNS(Platform::String xpath, Platform::Object namespaces)
public IXmlNode SelectSingleNodeNS(String xpath, Object namespaces)
Public Function SelectSingleNodeNS(xpath As String, namespaces As Object) As IXmlNode
var iXmlNode = iXmlNodeSelector.selectSingleNodeNS(xpath, namespaces);
Parameters
xpath
Platform::String String String String

Specifies an XPath expression.

namespaces
Platform::Object Object Object Object

Contains a string that specifies the namespaces to use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.

Returns

The first node that matches the given pattern-matching operation. If no nodes match the expression, this method returns a null value.

Remarks

Prefixes in the query are resolved using the specified namespace declarations.