XmlDocumentXPathExtensions.SelectNodes Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

SelectNodes(XmlNode, String)

Selects a list of nodes matching the specified XPath expression.

SelectNodes(XmlNode, String, XmlNamespaceManager)

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

SelectNodes(XmlNode, String)

Source:
XmlDocumentXPathExtensions.cs

Selects a list of nodes matching the specified XPath expression.

C#
public static System.Xml.XmlNodeList SelectNodes(this System.Xml.XmlNode node, string xpath);

Parameters

node
XmlNode

The node where the navigator is initially positioned.

xpath
String

The XPath expression to match.

Returns

A collection of nodes that match the specified XPath expression.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

SelectNodes(XmlNode, String, XmlNamespaceManager)

Source:
XmlDocumentXPathExtensions.cs

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

C#
public static System.Xml.XmlNodeList SelectNodes(this System.Xml.XmlNode node, string xpath, System.Xml.XmlNamespaceManager nsmgr);

Parameters

node
XmlNode

The node where the navigator is initially positioned.

xpath
String

The XPath expression to match.

nsmgr
XmlNamespaceManager

A namespace manager to resolve XPath expression prefix namespaces.

Returns

A collection of nodes that match the specified XPath expression.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)