Re: Troubles with importing a node from another DOMDocument
| From: | Rob Richards | Date: | Thu, 17 Jul 2008 14:31:51 +0000 |
| Subject: | Re: Troubles with importing a node from another DOMDocument | ||
| References: | 1 2 3 4 5 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-614@lists.php.net to get a copy of this message | ||
Stanislav Sazonov wrote:
I think it is conceptually wrong. If i wanna clone a node with its owner i would use cloneNode() method. Operator clone() should make _independent_ objects instead, thus should behave like importNode().I disagree there. Clone means make a duplicate copy, not a partial. A duplicate of a node includes the ownerDocument. Now if the keyword were semiclone or something I might agree with you. Robusing the clone keyword is the same as using the cloneNode() method doing a deep copy on the node in question. Rob