XPathNavigatorExtensions.XPathSelectSingleNode Method (XPathNavigator, string)XPathNavigatorExtensions.XPathSelectSingleNode Method (XPathNavigator, String)XPathNavigatorExtensions::XPathSelectSingleNode Method (XPathNavigator^, String^)
Evaluates the specified XPath 2.0 expression to select a single node.
- Namespace: XmlPrime.ExtensionMethodsXmlPrime.ExtensionMethodsXmlPrime.ExtensionMethods
- Assembly: XmlPrime.ExtensionMethods (in XmlPrime.ExtensionMethods.dll)
Syntax
Public Shared Function XPathSelectSingleNode( _ navigator As System.Xml.XPath.XPathNavigator, _ expression As String _ ) As System.Xml.XPath.XPathNavigator
public static System.Xml.XPath.XPathNavigator XPathSelectSingleNode( System.Xml.XPath.XPathNavigator navigator, string expression )
public: static System.Xml.XPath::XPathNavigator^ XPathSelectSingleNode( System.Xml.XPath::XPathNavigator^ navigator, String^ expression )
Parameters
- navigator
Type: System.Xml.XPath.XPathNavigatorSystem.Xml.XPath.XPathNavigatorSystem.Xml.XPath::XPathNavigator^
The XPathNavigatorXPathNavigatorXPathNavigator to use as the context item.
- expression
Return Value
Type: System.Xml.XPath.XPathNavigatorSystem.Xml.XPath.XPathNavigatorSystem.Xml.XPath::XPathNavigator^
The result of the evaluating the XPath 2.0 expression specified;
otherwise, null
a null reference (Nothing
in Visual Basic)
nullptr
if there are no query results.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | expression is null
a null reference (Nothing in Visual Basic)
nullptr . |
InvalidCastExceptionInvalidCastExceptionInvalidCastException | The return type was an item which was not a node. |
XdmExceptionXdmExceptionXdmException | An error occurred compiling or evaluating the XPath 2.0 expression. |