What is the purpose of the method nodeMap.setNamedItem()?
A
Sets ID
B
Sets attribute node
C
Sets element name
D
Sets element type
Correct Answer: Sets attribute node
The setNamedItem() method adds the specified node to the NamedNodeMap. The method nodeMap.setNamedItem() sets the specified attribute node (by name).