Hi David,
what happens if you try it this way:
Element element = ... ; Iterator it = element.elements().iterator(); while (it.hasNext()) { ... // delete elements you don't want using it.remove(); }
Exactly. Dave: the iterator returned by elementIterator() is a FilterIterator, which does not support remove(). Instead elements() returns a BackedList, which implements the remove() method (called by the iterator). So you should be fine with elements().iterator().
Alex
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev