編集

次の方法で共有


XmlDocumentXPathExtensions.SelectSingleNode Method

Definition

Overloads

SelectSingleNode(XmlNode, String)

Selects the first node that matches the XPath expression.

SelectSingleNode(XmlNode, String, XmlNamespaceManager)

Selects the first node that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied namespace manager.

SelectSingleNode(XmlNode, String)

Selects the first node that matches the XPath expression.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Xml::XmlNode ^ SelectSingleNode(System::Xml::XmlNode ^ node, System::String ^ xpath);
public static System.Xml.XmlNode SelectSingleNode (this System.Xml.XmlNode node, string xpath);
static member SelectSingleNode : System.Xml.XmlNode * string -> System.Xml.XmlNode
<Extension()>
Public Function SelectSingleNode (node As XmlNode, xpath As String) As XmlNode

Parameters

node
XmlNode

The node where the navigator is initially positioned.

xpath
String

The XPath expression to match.

Returns

The first node that matches the XPath query, or null if no matching node is found.

See also

Applies to

SelectSingleNode(XmlNode, String, XmlNamespaceManager)

Selects the first node that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied namespace manager.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Xml::XmlNode ^ SelectSingleNode(System::Xml::XmlNode ^ node, System::String ^ xpath, System::Xml::XmlNamespaceManager ^ nsmgr);
public static System.Xml.XmlNode SelectSingleNode (this System.Xml.XmlNode node, string xpath, System.Xml.XmlNamespaceManager nsmgr);
static member SelectSingleNode : System.Xml.XmlNode * string * System.Xml.XmlNamespaceManager -> System.Xml.XmlNode
<Extension()>
Public Function SelectSingleNode (node As XmlNode, xpath As String, nsmgr As XmlNamespaceManager) As XmlNode

Parameters

node
XmlNode

The node where the navigator is initially positioned.

xpath
String

The XPath expression to match.

nsmgr
XmlNamespaceManager

A namespace manager to resolve XPath expression prefix namespaces.

Returns

The first node that matches the XPath query, or null if no matching node is found.

See also

Applies to