DomDocument.importNode
A copy of src owned by this document. Deep: with all the descendants and the template contents; else only the node (and the attributes). It returns null if out of memory. The visit is iterative, so deep trees don't overflow the stack.