XmlDocumentType.SelectNodesNS(String, Object) メソッド

定義

指定したパターン マッチング操作をこのノードのコンテキストに適用し、一致するノードの一覧を XmlNodeList として返します。

public:
 virtual XmlNodeList ^ SelectNodesNS(Platform::String ^ xpath, Platform::Object ^ namespaces) = SelectNodesNS;
XmlNodeList SelectNodesNS(winrt::hstring const& xpath, IInspectable const& namespaces);
public XmlNodeList SelectNodesNS(string xpath, object namespaces);
function selectNodesNS(xpath, namespaces)
Public Function SelectNodesNS (xpath As String, namespaces As Object) As XmlNodeList

パラメーター

xpath
String

Platform::String

winrt::hstring

XPath 式を指定します。

namespaces
Object

Platform::Object

IInspectable

新しい名前空間を外部で定義する必要がある場合に XPath 式で使用する名前空間を指定する文字列が含まれます。 名前空間は、名前空間宣言属性のスペース区切りのリストとして XML スタイルで定義されます。 このプロパティを使用して、既定の名前空間も設定できます。

戻り値

指定されたパターン マッチング操作を適用して選択されたノードのコレクション。 ノードが選択されていない場合は、空のコレクションを返します。

実装

M:Windows.Data.Xml.Dom.IXmlNodeSelector.SelectNodesNS(System.String,System.Object) M:Windows.Data.Xml.Dom.IXmlNodeSelector.SelectNodesNS(Platform::String,Platform::Object) M:Windows.Data.Xml.Dom.IXmlNodeSelector.SelectNodesNS(winrt::hstring,IInspectable)

var nodes = node.SelectNodesNS("//mux:TreeView", "xmlns:mux='using:Microsoft.UI.Xaml.Controls'");
auto nodes = node.SelectNodesNS(L"//mux:TreeView", winrt::box_value(L"xmlns:mux='using:Microsoft.UI.Xaml.Controls'"));

注釈

クエリ内のプレフィックスは、指定された名前空間宣言を使用して解決されます。

適用対象