[jdom-interest] insertChild in Element

Trebor A. Rude trebor at bwn.net
Fri Sep 1 20:27:23 PDT 2000

On Fri, 01 Sep 2000, Jason Hunter wrote:
>>         I agree that the getting functions should stay, since they have
>> no useful equivilents in the List API, but the addContent/removeContent
>> functions do have equivilents in the List API
>No they don't.  The List API has no easy way to say "remove all elements
>with the name 'foo'".  Things like that which are fairly common we have
>convenience methods for.  The addContent() we need so you can do easy
>method chaining.

	Ah, chaining. Keep forgetting about that, don't use it. Is it even 
possible with the DOM (if not, would explain why I don't use it, keep 
following the old patterns)? Don't remember.

>> (and the add functions of the
>> PartialList can be changed or overloaded so they only accept JDOM
>> nodes,
>You can't overload a method that takes Object to accept only JDOM nodes.

	No, but you could add methods that mimic the List methods and only take 
JDOM nodes. Of course, then you'd have to cast the List to a PartialList 
to use them, which really isn't any good, is it? Oh well, I just write 
whatever I happen to be thinking at the moment and trust the list to sort 
it out if I'm out of my mind. :)

Trebor A. Rude
trebor at bwn.net
Registered Linux User #89308

More information about the jdom-interest mailing list