| 
	
 | 
 Posted by Christian Stocker on 02/17/05 09:15 
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
 
  
Navigation:
[Reply to this message] 
 |