wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Remove Parent of an element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Remove Parent of an element" Watch "Remove Parent of an element" New topic

Remove Parent of an element

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
Hello ladies and gentlemen

I want to add an existing child-element as a root-element in another file... but i get this error

So i want to know how do i remove the parent of that child element so i can make it a root element...

Thanks :thumb:
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12760
Look at the javadocs for the org.w3c.dom.Node interface - particularly the cloneNode( true ) method. I suspect that is what you want but have not actually tried it.

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
Thank youu so much will
this method worked..
I agree. Here's the link: http://aspose.com/file-tools
subject: Remove Parent of an element
Similar Threads
help , Concurrent Modification Exception
append an element to a text node using jdom?
retrieving object hierarchy - many-to-one?
dom4j inserting elements
XML Edior