[jdom-interest] Moving Subtrees using JDOM

Rocker Bill r0cker at hotmail.com
Fri Feb 22 08:35:43 PST 2002


Hi,

Has anyone out there got any idea how to move subtrees within a document, 
while maintaining the hierarchy structure of the subtree. I have managed to 
recursively obtain a list of the children beneath an element, but am having 
trouble placing these elements (as they were originally structured) beneath 
a new element. It appears the setChildren( List inList) method does a one 
layer placement and does not maintain the hierarchy - is this in fact the 
case??  I guess I could recursively place these children below the new 
element - but that seems like unnecessary overkill. Are there any better or 
more appealing ways to attempt such a thing? Any quick suggestions or 
comments would be welcome... as the hair on my head is rapidly thinning!

Chrs,
Ash

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the jdom-interest mailing list