XPathNavigator.IsDescendant(XPathNavigator) Méthode

Définition

Détermine si le spécifié XPathNavigator est un descendant du courant XPathNavigator.

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

Paramètres

nav
XPathNavigator

À XPathNavigator comparer à ceci XPathNavigator.

Retours

true si le spécifié XPathNavigator est un descendant du courant XPathNavigator; sinon, false.

Remarques

Il XPathNavigator s’agit d’un descendant du courant XPathNavigator s’il est positionné sur un nœud descendant du courant XPathNavigator. Prenons, par exemple, la chaîne XML suivante :

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

Si le courant XPathNavigator est positionné sur le item nœud et que le XPathNavigator paramètre spécifié est positionné sur le name nœud, IsDescendant retourne true.

Cette méthode retourne false toujours dans les conditions suivantes :

  • Le XPathNavigator partage spécifié partage la même implémentation, mais pointe vers une instance de document différente de celle du navigateur actuel.

  • L’implémentation XPathNavigator spécifiée est différente de celle du navigateur actuel.

S’applique à