[jdom-interest] Suggestion

Jason Hunter jhunter at collab.net
Fri Dec 22 20:13:46 PST 2000


> Mike Jennings wrote:
> 
> Hi,
> 
> What about adding a method to org.jdom.Element
> 
> public String getAttributeValue(String name, Namespace ns, String default)

There'd actually be two methods to add:

public String getAttributeValue(String name, String default)
public String getAttributeValue(String name, Namespace ns, String
default)

> Such that if the attribute named "name" does not exist, the String
> "default" is returned.
> This could be useful in cases where an XML file has default values for
> attributes
> that are not specified.
> 
> What do the powers that be think of this idea?

Seems to fit in nicely.  What do others think?

-jh-



More information about the jdom-interest mailing list