From http://www.w3schools.com (Copyright Refsnes Data)
Complete Element Object Reference
The replaceChild() method replaces a child node with another.
This function returns the replaced node on success, or NULL on failure.
| elementNode.replaceChild(new_node,old_node) |
| Parameter | Description |
|---|---|
| new_node | Required. Specifies the new node |
| old_node | Required. Specifies the child node to replace |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and replaces the first <book> element:
Example
Try it yourself » |
Complete Element Object Reference
From http://www.w3schools.com (Copyright Refsnes Data)