[jdom-interest] Re: setAttribute???
dmc at chimerasoft.com
Sat Jan 13 16:02:56 PST 2001
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.
More information about the jdom-interest