System.Xml.XPath.XPathNavigator.IsDescendant Method

Determines whether the specified System.Xml.XPath.XPathNavigator is a descendant of the current System.Xml.XPath.XPathNavigator.

Syntax

public virtual bool IsDescendant (XPathNavigator nav)

Parameters

nav
The System.Xml.XPath.XPathNavigator to compare to this System.Xml.XPath.XPathNavigator.

Returns

true if the specified System.Xml.XPath.XPathNavigator is a descendant of the current System.Xml.XPath.XPathNavigator; otherwise, false.

Remarks

An System.Xml.XPath.XPathNavigator is a descendant of the current System.Xml.XPath.XPathNavigator if it is positioned on a descendant node of the current System.Xml.XPath.XPathNavigator. Take, for example, the following XML string:

<item><name>widget</name></item>

If the current System.Xml.XPath.XPathNavigator is positioned on the item node, and the System.Xml.XPath.XPathNavigator specified is positioned on the name node, XPathNavigator.IsDescendant(XPathNavigator) returns true.

This method always returns false under the following conditions:

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