XmlText.SelectSingleNodeNS(String, Object) メソッド

定義

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

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

パラメーター

xpath
String

Platform::String

winrt::hstring

XPath 式を指定します。

namespaces
Object

Platform::Object

IInspectable

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

戻り値

指定されたパターン マッチング操作に一致する最初のノード。 式に一致するノードがない場合、このメソッドは null 値を返します。

実装

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

var input = node.SelectSingleNodeNS("//*[@x:Name='Input']", "xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'");
auto input = node.SelectSingleNodeNS(L"//*[@x:Name='Input']", winrt::box_value(L"xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'"));

注釈

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

適用対象