[jdom-interest] Re: setAttribute???

Jason Hunter jhunter at acm.org
Mon Jan 15 18:28:15 PST 2001

Dave Churchville wrote:
> Is there any reason why JDOM doesn't have a setAttribute( String name,
> String value) method?
> addAttribute is fine when constructing new documents from scratch, but
> if you are reading a document and want to modify a value, you currently
> have to say "getAttribute, if not null, then set the Attribute value.
> If null, call addAttribute".
> Admittedly, its not that hard, but setAttribute that would set the value
> of the "Attribute" object if it exists, else create one and set it,
> would be nice to have, and consistent with "setText" on Element.

So would you propose to have both "add" and "set" varieties?  Or just


More information about the jdom-interest mailing list