Element Object
The cloneNode() method creates an exact copy of a specified node.
This method returns the cloned node.
| Parameter | Description |
|---|---|
| include_all | Required. If the Boolean parameter is set to true, the cloned node clones all the child nodes of the original node as well |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and copies the first <book> node, then adds the copy to the end of the node list:
Output:
Element Object
Your message has been sent to W3Schools.