[jdom-interest] Important proposal: Element/Document changes

Jason Hunter jhunter at collab.net
Tue Jul 25 13:27:04 PDT 2000

>         The fundemental idea here is to replace the element in the
> backing list with a new element in exactly the same place.  replaceChild
> makes more sense to me, as I don't need to know the index of the element
> in the parent's list.  However, addChildAt might provide more flexibility
> in the long run.  

addChildAt() can be done with element.getMixedContent().add(int,
Object).  List doesn't have a replace() method though.

> If I had to vote, I'd vote for replaceChild.
> FWIW, I have the code implemented as a static helper now, so I can
> send it along if need be.



More information about the jdom-interest mailing list