Share via


XmlDocument.CreateElementNS(Object, String) Method

Definition

Creates an element node using the specified namespace and name.

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

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 for the new element node. It is case-sensitive. This name is subsequently available as the element node's NodeName property.

Returns

The newly created object.

Examples

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

Applies to