共用方式為


XmlNamedNodeMap.GetNamedItemNS(Object, String) 方法

定義

擷取具有指定命名空間和名稱的屬性。

public:
 virtual IXmlNode ^ GetNamedItemNS(Platform::Object ^ namespaceUri, Platform::String ^ name) = GetNamedItemNS;
IXmlNode GetNamedItemNS(IInspectable const& namespaceUri, winrt::hstring const& name);
public IXmlNode GetNamedItemNS(object namespaceUri, string name);
function getNamedItemNS(namespaceUri, name)
Public Function GetNamedItemNS (namespaceUri As Object, name As String) As IXmlNode

參數

namespaceUri
Object

Platform::Object

IInspectable

屬性的命名空間名稱。

name
String

Platform::String

winrt::hstring

屬性的名稱。

傳回

具有指定命名空間和名稱的屬性。 如果屬性節點不在這個集合中,這個方法會傳回 Null。

範例

var node = attributes.GetNamedItemNS("http://schemas.microsoft.com/winfx/2006/xaml", "Name");
auto node = attributes.GetNamedItemNS(winrt::box_value(L"http://schemas.microsoft.com/winfx/2006/xaml"), L"Name");

適用於