Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlNode::SelectNodes Method

 

Selects a list of nodes matching the XPath expression.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

NameDescription
System_CAPS_pubmethodSelectNodes(String^)

Selects a list of nodes matching the XPath expression.

System_CAPS_pubmethodSelectNodes(String^, XmlNamespaceManager^)

Selects a list of nodes matching the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager.

XPath expressions can include namespaces. Namespace resolution is supported using the XmlNamespaceManager. If the XPath expression includes a prefix, the prefix and namespace URI pair must be added to the XmlNamespaceManager.

System_CAPS_noteNote

If the XPath expression does not include a prefix, it is assumed that the namespace URI is the empty namespace. If your XML includes a default namespace, you must still add a prefix and namespace URI to the XmlNamespaceManager; otherwise, you will not get any nodes selected.

For more information, see Select Nodes Using XPath Navigation. For code examples, choose an overload from the overload list in the previous section.

Return to top
Show:
© 2017 Microsoft