Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft