XPathNavigator.Matches Method (String)

 

Determines whether the current node matches the specified XPath expression.

Namespace:   System.Xml.XPath
Assembly:  System.Xml (in System.Xml.dll)

public virtual bool Matches(
	string xpath
)

Parameters

xpath
Type: System.String

The XPath expression.

Return Value

Type: System.Boolean

true if the current node matches the specified XPath expression; otherwise, false.

Exception Condition
ArgumentException

The XPath expression cannot be evaluated.

XPathException

The XPath expression is not valid.

This method has no affect on the state of the XPathNavigator.

For an example of the Matches method, see the XPathNavigator.Matches method.

.NET Framework
Available since 1.1
Silverlight
Available since 4.0
Return to top
Show: