XmlDocumentXPathExtensions.SelectNodes 方法
定义
重载
| SelectNodes(XmlNode, String) |
选择与指定的 XPath 表达式匹配的节点列表。Selects a list of nodes matching the specified XPath expression. |
| SelectNodes(XmlNode, String, XmlNamespaceManager) |
选择与指定的 XPath 表达式匹配的节点列表。Selects a list of nodes matching the specified XPath expression. 使用提供的命名空间管理器解析 XPath 表达式中的任何前缀。Any prefixes found in the XPath expression are resolved using the supplied namespace manager. |
SelectNodes(XmlNode, String)
选择与指定的 XPath 表达式匹配的节点列表。Selects a list of nodes matching the specified XPath expression.
public:
[System::Runtime::CompilerServices::Extension]
static System::Xml::XmlNodeList ^ SelectNodes(System::Xml::XmlNode ^ node, System::String ^ xpath);
public static System.Xml.XmlNodeList SelectNodes (this System.Xml.XmlNode node, string xpath);
static member SelectNodes : System.Xml.XmlNode * string -> System.Xml.XmlNodeList
<Extension()>
Public Function SelectNodes (node As XmlNode, xpath As String) As XmlNodeList
参数
- node
- XmlNode
导航器最初定位到的节点。The node where the navigator is initially positioned.
- xpath
- String
要匹配的 XPath 表达式。The XPath expression to match.
返回
与指定的 XPath 表达式匹配的节点的集合。A collection of nodes that match the specified XPath expression.
适用于
SelectNodes(XmlNode, String, XmlNamespaceManager)
选择与指定的 XPath 表达式匹配的节点列表。Selects a list of nodes matching the specified XPath expression. 使用提供的命名空间管理器解析 XPath 表达式中的任何前缀。Any prefixes found in the XPath expression are resolved using the supplied namespace manager.
public:
[System::Runtime::CompilerServices::Extension]
static System::Xml::XmlNodeList ^ SelectNodes(System::Xml::XmlNode ^ node, System::String ^ xpath, System::Xml::XmlNamespaceManager ^ nsmgr);
public static System.Xml.XmlNodeList SelectNodes (this System.Xml.XmlNode node, string xpath, System.Xml.XmlNamespaceManager nsmgr);
static member SelectNodes : System.Xml.XmlNode * string * System.Xml.XmlNamespaceManager -> System.Xml.XmlNodeList
<Extension()>
Public Function SelectNodes (node As XmlNode, xpath As String, nsmgr As XmlNamespaceManager) As XmlNodeList
参数
- node
- XmlNode
导航器最初定位到的节点。The node where the navigator is initially positioned.
- xpath
- String
要匹配的 XPath 表达式。The XPath expression to match.
- nsmgr
- XmlNamespaceManager
用于解析 XPath 表达式前缀命名空间的命名空间管理器。A namespace manager to resolve XPath expression prefix namespaces.
返回
与指定的 XPath 表达式匹配的节点的集合。A collection of nodes that match the specified XPath expression.