[jdom-interest] Maybe a bug report related to the 'detach' me

Ken Rune Helland kenh at csc.no
Thu Apr 11 03:03:22 PDT 2002

> But Brett McLaughlin told me to use the "detach()" method
> to remove an element from the tree.

If you have a reference to an element you can remove it from the
tree with .detach(). But unfortunatly this conflicts with the
definition of the Iterator interface witch states an iterator 
shoud be invalidatet if the list is modified outside the iterator.

If you want to use the Element.detach() rater than the Iterator.remove()
use the ListIterator instead. If you get a error the it is a bug
in the List/ListIterator implementation.

e-mail : kenh at csc.no
Tlf    : +47 22 95 86 45
Tlf Mob: +47 91 87 27 38

More information about the jdom-interest mailing list