Matches con XPath e XPathNavigator
Il metodo Matches accetta un criterio XSLT come input e restituisce un valore Boolean che indica se il nodo corrente corrisponde alla XPathExpression data o alla XPathExpression compilata. Ad esempio, nav.Matches("b[@c]")
restituirà un valore True se il nodo corrente è l'elemento b
, e possiede un attributo denominato c
. La chiamata al metodo Matches non altera lo stato dell'XPathNavigator.
Vedere anche
XPathNavigator in .NET Framework | Select con XPath e XPathNavigator | Evaluate con XPath e XPathNavigator