Name

setNamedItemNS: arg(2)

Synopsis

Identical in function to the basic setNamedItem method, except that it considers namespace properties in the Node object. A reference to the replaced Node object is returned.

Argument

arg: Node

The Node object to be stored in the map. The values of the namespaceURI and localName properties are used as the lookup key. If another node with identical values for these two properties exists, the new node replaces it.

Exceptions

WRONG_DOCUMENT_ERR

Raised if a document different than the creator of the target NamedNodeMap created the arg node.

NO_MODIFICATION_ALLOWED_ERR

Raised if the NamedNodeMap is read-only.

INUSE_ATTRIBUTE_ERR

Raised if the arg node is an Attr node already in use by another element’s attributes map.

Java binding

public Node setNamedItemNS(Node arg) throws DOMException;

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.