Passing a node that's not an attribute like an attribute

With the attribute "atributtes" from the Node interface, you can retrieve a
NamedNodeMap interface containing the attributes of a node (if ti is an
element).

In the NamedNodeMap interface there is a method called setNamedItem that
adds a node to the map of nodes.

Suposse you retrieve the attributes of an element with the attribute
"attributes".
Next, you invoke to the method setNamedItem to add an attribute, but you
pass another
type of node, say an element.

What must happen? You can add a node that's not an attribute to the list of
attributes
of an element?

Received on Thursday, 4 January 2001 15:54:16 UTC