You are here: Copying XML nodes with DOM « All PHP « IT news, forums, messages
Copying XML nodes with DOM

Posted by Adrián Ribao on 06/18/06 11:49

Hi, I'm a PHP 5 user, I've been using the DOM for a while, but now, I can't
solve a problem.
The best way to explain is witn an example:
I have 2 XML documents:
Doc 1:
<root>
<one />
<two>
Hello
<three>World</three>
</two>
</root>

Doc 2:
<whatever>
<node />
</whatever>


I want the content of <two> inside <node>, but I don't want to copy the
<two> tag, I want this:

<whatever>
<node>
Hello
<three>World</three>
</node>
</whatever>

So, I can't do it with ImportNode and AppendChild. I have no idea how to do
it.
Can someone help me please?
Thank you very much.

 

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

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