Share via


XmlElement.GetAttributeNS(Object, String) Method

Definition

Returns the value of the attribute.

public:
 virtual Platform::String ^ GetAttributeNS(Platform::Object ^ namespaceUri, Platform::String ^ localName) = GetAttributeNS;
winrt::hstring GetAttributeNS(IInspectable const& namespaceUri, winrt::hstring const& localName);
public string GetAttributeNS(object namespaceUri, string localName);
function getAttributeNS(namespaceUri, localName)
Public Function GetAttributeNS (namespaceUri As Object, localName As String) As String

Parameters

namespaceUri
Object

Platform::Object

IInspectable

The namespace of the attribute to get.

localName
String

Platform::String

winrt::hstring

The name of the attribute without the namespace prefix.

Returns

String

Platform::String

winrt::hstring

The string value of the attribute.

Examples

var width = element.GetAttributeNS("http://www.w3.org/2000/svg", "width");
auto width = element.GetAttributeNS(winrt::box_value(L"http://www.w3.org/2000/svg"), L"width");

Applies to