ECMAScript binding: setNamedItemNS(arg) (returns Node; arg is a Node; can throw DOMException)
Introduced in DOM Level 2.
If a node with namespaceURI and localName values matching arg.namespaceURI and arg.localName already exists in the map, it is removed and returned. Otherwise, null is returned.
arg is then inserted into the map.
The exceptions thrown are:
- The node you're trying to insert into the map was created in another document. Don't do this.
- The node is read only.
- The node is in use as an Attr on an another Element - you'll need to clone it before trying to add it here.