System.Xml.XPath.XPathNavigator.SelectDescendants Method

Selects all the descendant nodes of the current node with the local name and namespace URI specified.

Syntax

public virtual XPathNodeIterator SelectDescendants (string name, string namespaceURI, bool matchSelf)

Parameters

name
The local name of the descendant nodes.
namespaceURI
The namespace URI of the descendant nodes.
matchSelf
true to include the context node in the selection; otherwise, false.

Returns

An System.Xml.XPath.XPathNodeIterator that contains the selected nodes.

Remarks

If string.Empty is specified as the name parameter, all descendant nodes that belong to the specified namespace URI are selected. If string.Empty is specified as the namespaceURI parameter, all descendant nodes with the specified local name that belong to no namespace are selected. If both the local name and namespace URI parameters are string.Empty, all descendant nodes that belong to no namespace are selected.

A descendant is a child or a child of a child and so on; thus the selected nodes will never contain attribute or namespace nodes.

The XPathNavigator.SelectDescendants(string, string, bool) method has no effect on the state of the System.Xml.XPath.XPathNavigator.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0