[jdom-interest] Replace Element?
Thomas M. Sasala
tsasala at hifusion.com
Thu Jun 22 10:25:51 PDT 2000
The problem is there is no indexOf for
element....which I have implemented in my local
copy of Element....is it a worth wild change
across the board?
Jools Enticknap wrote:
> Call getChildren() on the Element.
> Then call add( int index, Object current ) and specify where you want the
> new object to be inserted.
> On Wed, 21 Jun 2000, Thomas M. Sasala wrote:
> > I know it's not possible with the current API, but is
> > it possible to replace a element with a new element *without*
> > effecting the order in which elements are stored? We're
> > having a problem where elements (children) at the same level
> > are being processed, deleted, and added again. The problem
> > is when they are added, the original order of the children
> > is being mucked up. The 'new' element (aka, the processed
> > element) is being added to the end of the list, instead of
> > where the original element sat. The effect is obvious and
> > intended with the API as it stands now. However, is there
> > any reason a replaceElement can't be added? I've looked
> > through the code and it looks feasible, but the PartialList
> > implementation may cause an issue. I don't really
> > understand it well enough to know what effect mucking with
> > children will have on the backingList. Any ideas?
> > -Tom
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://firstname.lastname@example.org
More information about the jdom-interest