[jdom-interest] Divorcing Root Element from document!!
bob at werken.com
Tue Nov 7 13:31:49 PST 2000
> I am trying to take the root element of one Document and append it as a
> child element on a second document... I continually get errors about it
> having a parent. How do you divorce the root element from the Document?
Set the source Document's RootElement to null, methinks, after
you've suck out the RootElement that needs transplanting.
Element root = doc.getRootElement();
// can now reparent root
More information about the jdom-interest