## XPathNavigator::Matches(SharedPtr\<XPathExpression\>) method


Determines whether the current node matches the specified [XPathExpression](../../xpathexpression/).

```cpp
virtual bool System::Xml::XPath::XPathNavigator::Matches(SharedPtr<XPathExpression> expr)
```


| Parameter | Type | Description |
| --- | --- | --- |
| expr | SharedPtr\<XPathExpression\> | An [XPathExpression](../../xpathexpression/) object containing the compiled [XPath](../../) expression. |

### ReturnValue

**true** if the current node matches the [XPathExpression](../../xpathexpression/); otherwise, **false**.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XPathExpression](../../xpathexpression/)
* Class [XPathNavigator](../)
* Namespace [System::Xml::XPath](../../)
* Library [Aspose.PUB for C++](../../../)
## XPathNavigator::Matches(String) method


Determines whether the current node matches the specified [XPath](../../) expression.

```cpp
virtual bool System::Xml::XPath::XPathNavigator::Matches(String xpath)
```


| Parameter | Type | Description |
| --- | --- | --- |
| xpath | String | The [XPath](../../) expression. |

### ReturnValue

**true** if the current node matches the specified [XPath](../../) expression; otherwise, **false**.

## See Also

* Class [String](../../../system/string/)
* Class [XPathNavigator](../)
* Namespace [System::Xml::XPath](../../)
* Library [Aspose.PUB for C++](../../../)
