Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy a Node into a new Document?

Status
Not open for further replies.

BTCMan

Programmer
Jun 17, 2005
21
BR
Hi guys,

I would like to read a node with all its contents from a DOM tree and insert it in a new DOM. Any hint? Below is my dom tree format (already in memory as a dom tree) and the expected result:
MEMORY DOM:

<?xml version="1.0" encoding="UTF-8"?>
<Oper>
<Parameters3>test3</Parameters3>
<ze3>
<mane3>aaaaaa3</mane3>
<bla>
<bla2>blablabla</bla2>
</bla>
<tiao3>bbbbbb3</tiao3>
</ze3>
<x3>
<mane3>aaaaaa3</mane3>
<tiao3>bbbbbb3</tiao3>
<tiao3>cccccc3</tiao3>
</x3>
</Oper>


EXPECTED RESULT (create a new DOM and put ze3 in it):
<?xml version="1.0" encoding="UTF-8"?>
<ze3>
<mane3>aaaaaa3</mane3>
<bla>
<bla2>blablabla</bla2>
</bla>
<tiao3>bbbbbb3</tiao3>
</ze3>

Thanks,

BTCMan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top