System.Xml.XPath.XPathNavigator.SelectSingleNode Method

Selects a single node in the System.Xml.XPath.XPathNavigator using the specified System.Xml.XPath.XPathExpression object.

Syntax

public virtual XPathNavigator SelectSingleNode (XPathExpression expression)

Parameters

expression
An System.Xml.XPath.XPathExpression object containing the compiled XPath query.

Returns

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.

Remarks

The XPathNavigator.SelectSingleNode(XPathExpression) method selects the first node that matches the compiled XPath query contained in the System.Xml.XPath.XPathExpression object in the System.Xml.XPath.XPathNavigator.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0