[From nobody Fri Aug 6 17:05:26 2004 X-Mozilla-Status2: 00000000 Message-ID: <3A44267A.16E21E30@collab.net> Date: Fri, 22 Dec 2000 20:13:46 -0800 From: Jason Hunter <jhunter@collab.net> X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Mike Jennings <mjenning@islandnet.com> CC: jdom-interest@jdom.org Subject: Re: [jdom-interest] Suggestion References: <005001c06c90$49b3bb60$96cc4518@gvdt1.bc.wave.home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > 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- ]