XPathNavigator.IsDescendant(XPathNavigator) Method
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.
Determines whether the specified XPathNavigator is a descendant of the current XPathNavigator.
public:
virtual bool IsDescendant(System::Xml::XPath::XPathNavigator ^ nav);
public virtual bool IsDescendant (System.Xml.XPath.XPathNavigator? nav);
public virtual bool IsDescendant (System.Xml.XPath.XPathNavigator nav);
abstract member IsDescendant : System.Xml.XPath.XPathNavigator -> bool
override this.IsDescendant : System.Xml.XPath.XPathNavigator -> bool
Public Overridable Function IsDescendant (nav As XPathNavigator) As Boolean
- nav
- XPathNavigator
The XPathNavigator to compare to this XPathNavigator.
true
if the specified XPathNavigator is a descendant of the current XPathNavigator; otherwise, false
.
An XPathNavigator is a descendant of the current XPathNavigator if it is positioned on a descendant node of the current XPathNavigator. Take, for example, the following XML string:
<item><name>widget</name></item>
If the current XPathNavigator is positioned on the item
node, and the XPathNavigator specified is positioned on the name
node, IsDescendant returns true
.
This method always returns false
under the following conditions:
The XPathNavigator specified shares the same implementation but points at a different document instance than the current navigator.
The XPathNavigator specified has a different implementation than the current navigator.
Produit | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :