ZVON > References > DOM2 Reference

importNode (method )

Owning interface and usage:  
Document.importNode(importedNode, deep)

Member of these other interfaces:  
none

Description:  
Imports a node from another document to this document. The returned node has no parent; (parentNode is null). The source node is not altered or removed from the original document; this method creates a new copy of the source node.

Parameters:  
Node importedNode  -  The node to import.
Boolean deep  -  If true, recursively import the subtree under the specified node; if false, import only the node itself. This has no effect on Attr, EntityReference, and Notation nodes.

Returns:  
Node -  The imported node that belongs to this Document.

Exceptions:  
DOMException NOT_SUPPORTED_ERR
Raised if the type of node being imported is not supported.

Note:  
(Exact behavior for diferent node-types see in standard.)


Example: