[jdom-interest] NoSuch*Exceptions in JDOM

Jason Hunter jhunter at acm.org
Mon Jul 10 10:37:59 PDT 2000


>   String getAttribute (String key, String defaultVal);
> 
> which would return the default value if the attribute was missing?
> That would enable us to set the default to null (or whatever) and skip
> the exceptions.

But you'll have to have additional versions of the method to deal with
namespaces, plus with this approach you lose out on the ability to get
int/float/double/etc attribute values which is a real convenience.

-jh-





More information about the jdom-interest mailing list