[jdom-interest] insertChild in Element

Trebor A. Rude trebor at bwn.net
Fri Sep 1 20:19:39 PDT 2000


	Yeah, they will track changes to the Elements they contain, but NodeList 
doesn't have any setting methods, so you can't change the tree using the 
list, like you can in JDOM.  That's what I meant.

On Fri, 01 Sep 2000, Jason Hunter wrote:
>BTW, in DOM the returned lists are live too.
>
>-jh-
>
>trebor.a.rude at lmco.com wrote:
>>         The counter to the argument against add() and such is that we
>> actually return a PartialList (a JDOM-implemented subclass of
>> LinkedList), so its implementations of the questionable functions could
>> be changed to disallow anything "bad". The whole notion of a "live"
>> list takes a little getting used to (simply because you just don't see
>> it that often), but once you understand it, it makes a lot of sense. In
>> my mind, the main argument for making Element implement List would be
>> that the model would then be closer to the DOM, easing the transition
>> for those used to that API.  But the function names of the List
>> interface don't really make it clear that you're operating on children,
>> as the functions in the DOM do. All in all, I don't think that
>> compatibility with the DOM is that important, and in fact, I think it
>> might be best if we removed some of the existing functions from Element
>> (addContent/removeContent), and let those go through the list too.

-- 
Trebor A. Rude
trebor at bwn.net
Registered Linux User #89308
http://counter.li.org/



More information about the jdom-interest mailing list