Share via


XmlDocument.CreateAttributeNS(Object, String) Method

Definition

Creates a new attribute with the specified namespace and name.

public:
 virtual XmlAttribute ^ CreateAttributeNS(Platform::Object ^ namespaceUri, Platform::String ^ qualifiedName) = CreateAttributeNS;
XmlAttribute CreateAttributeNS(IInspectable const& namespaceUri, winrt::hstring const& qualifiedName);
public XmlAttribute CreateAttributeNS(object namespaceUri, string qualifiedName);
function createAttributeNS(namespaceUri, qualifiedName)
Public Function CreateAttributeNS (namespaceUri As Object, qualifiedName As String) As XmlAttribute

Parameters

namespaceUri
Object

Platform::Object

IInspectable

The name of the desired namespace or a null value if no namespace is desired.

qualifiedName
String

Platform::String

winrt::hstring

The name of the new attribute object. This name is subsequently available as the new node's NodeName property.

Returns

The newly created attribute.

Examples

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

Applies to