## XPathNavigator::Compile method


Compiles a string representing an [XPath](../../) expression and returns an [XPathExpression](../../xpathexpression/) object.

```cpp
virtual SharedPtr<XPathExpression> System::Xml::XPath::XPathNavigator::Compile(String xpath)
```


| Parameter | Type | Description |
| --- | --- | --- |
| xpath | String | A string representing an [XPath](../../) expression. |

### ReturnValue

An [XPathExpression](../../xpathexpression/) object representing the [XPath](../../) expression.

## See Also

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