Re: Appending DOM doc as child in another DOM doc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi


On Mon, 14 Feb 2005 11:34:15 -0600, Chris Boget <chris.boget@xxxxxxxx> 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@xxxxxxxxxx  |  gnupg-keyid 0x5CE1DECB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux