[jdom-interest] Moving Subtrees using JDOM
Jason Hunter
jhunter at acm.org
Fri Feb 22 10:12:45 PST 2002
An element retains its children when it's moved, so I don't know what
problem you could be having. Just detach the element from its own
parent and splice it somewhere else, and all its children will tag along
for the ride.
If you think you spotted a bug, try the latest code from CVS (it's back
up).
-jh-
Rocker Bill wrote:
>
> 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
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list