You are here: Re: [PHP] Appending DOM doc as child in another DOM doc « PHP « IT news, forums, messages
Re: [PHP] Appending DOM doc as child in another DOM doc

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация