XML DOM createAttributeNS() method
Definition and usage
Create an Attr node with the specified name and namespace.
Syntax:
createAttributeNS(uri,name)
Parameters | Description |
---|---|
uri | The unique identifier of the namespace of the Attr. It is null if there is no namespace. |
name | The qualified name of the attribute, which should include the namespace prefix, colon, and local name. |
Return value
Returns the newly created Attr node with the specified name and namespace.
Description
createAttributeNS() method with createAttribute() methodSimilar, but the Attr node created by it, in addition to having the specified name, also has the specified namespace. This method is only used by XML documents that use namespaces.