[jdom-interest] Moving Subtrees using JDOM

Joan Roch joanr at k-os.com
Fri Feb 22 11:36:30 PST 2002

>Kind of like:
>Except the content being moved will have parents so this won't work
>exactly.  You'll have to iterate over them and detach each before the
>move.  Might as well just set up an iterator and do a detach/add for
>each right there.

This implies to identify each object (using "instanceof") in the list and then cast thoses objects into their specific classes because detach() is not defined in an interface common to each Object found in a JDOM tree... sigh. Maybe it would be a good idea to define an interface for all those objects that can be found in a JDOM tree.



More information about the jdom-interest mailing list