From http://www.w3schools.com (Copyright Refsnes Data)
Complete Element Object Reference
The removeAttributeNode() method removes a specified attribute node.
If a default value for the attribute is defined in a DTD, a new attribute immediately appears with the default value.
This function returns the removed attribute node.
| elementNode.removeAttributeNode(node) |
| Parameter | Description |
|---|---|
| node | Required. The node to remove |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and removes the "category" attribute nodes from all <book> elements:
Example
Output:
Try it yourself » |
Complete Element Object Reference
From http://www.w3schools.com (Copyright Refsnes Data)