[jdom-interest] Problems by sorting the list (JDOM beginner)

Galuc galuc at ebruit.com
Wed Mar 27 14:05:27 PST 2002


My problem is, I can't sort the List!
I use:
List ch = root.getChildren;
Collections.sort( ch , mycomp );

I wrote a comparator, what works.
But I got an exception:
org.jdom.IllegalAddException: The element already has an existing parent

I tried to search in the archive, but I couldn't find any solutions!

Thanks, Galuc

More information about the jdom-interest mailing list