Re: Problem with DOMElement/Node

From: Date: Wed, 09 Apr 2008 14:23:20 +0000
Subject: Re: Problem with DOMElement/Node
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-272788@lists.php.net to get a copy of this message
On Wed, Apr 9, 2008 at 10:17 AM, Christoph Boget <christoph.boget@gmail.com> wrote: > > DOM Nodes are specific to the document in which they were created, so > > you can't just append a node from one document into another document. > > The importNode function does what you want. > > > > http://us2.php.net/manual/en/function.dom-domdocument-importnode.php > > Interesting. Why is that, out of curiosity? > > Thanks for the pointer! That's exactly what I needed. :) > > thnx, > Chris > Well, it's part of the DOM specification. I'm not totally sure why (and don't have the inclination to read all about it), but DOM nodes are specific to the document and contain pointers and other information related to that document. If you really want to know moe details, you can check out the W3C site (or STW). http://www.w3.org/DOM/faq.html#moveNode Andrew

« previous php.general (#272788) next »