Re: Appending DOM doc as child in another DOM doc
| From: | Christian Stocker | Date: | Thu, 17 Feb 2005 07:15:31 +0000 |
| Subject: | Re: Appending DOM doc as child in another DOM doc | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-208896@lists.php.net to get a copy of this message | ||
Hi
On Mon, 14 Feb 2005 11:34:15 -0600, Chris Boget <chris.boget@wild.net> wrote:
> Is there a way to take an already existing DomDocument object
> and appending it as a child node within a seperate DomDocument
> object? Or would I have to pull it apart first and generate new
> DomNode/DomElement objects using the data then append those
> DomNode/DomElement objects to the seperate DomDocument?
//$node1 is a node of $dom1
$node1->appendChild($dom1->importNode($dom2->documentElement,true));
chregu
> thnx,
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid
0x5CE1DECB