Selects a single node in the System.Xml.XPath.XPathNavigator object using the specified XPath query with the System.Xml.IXmlNamespaceResolver object specified to resolve namespace prefixes.
- xpath
- A string representing an XPath expression.
- resolver
- The System.Xml.IXmlNamespaceResolver object used to resolve namespace prefixes in the XPath query.
An System.Xml.XPath.XPathNavigator object that contains the first matching node for the XPath query specified; otherwise null if there are no query results.
The XPathNavigator.SelectSingleNode(string, System.Xml.IXmlNamespaceResolver) method selects the first node that matches the XPath query specified. The XPathNavigator.SelectSingleNode(string, System.Xml.IXmlNamespaceResolver) method uses the System.Xml.IXmlNamespaceResolver object to resolve namespace prefixes.
In XPath all namespaces must be prefixed in a query. If an XML document uses a default namespace, you must still add a namespace prefix to the System.Xml.IXmlNamespaceResolver object.