<br><font size=2 face="sans-serif">I would agree if it were not for the fact that JDOM already has several convienience methods already, so if JDOM is prepared to have convenience methods then why not these.</font>
<br>
<br>
<table border=2 width=100%>
<tr>
<td width=15% bgcolor=white valign=top><font size=2 face="Courier New">java.lang.String</font>
<td width=84% bgcolor=white><a href=http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildText(java.lang.String)><font size=3 color=blue face="Courier New"><b><u>getChildText</u></b></font></a><font size=3 face="Courier New">(java.lang.String name)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the textual content of the named child element, or returns an empty </font><font size=3 face="Courier New">String</font><font size=3 face="Times New Roman"> ("") if the child has no textual content.</font>
<tr>
<td bgcolor=white valign=top><font size=2 face="Courier New"> java.lang.String</font>
<td bgcolor=white><a href="http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildText(java.lang.String, org.jdom.Namespace)"><font size=3 color=blue face="Courier New"><b><u>getChildText</u></b></font></a><font size=3 face="Courier New">(java.lang.String name, </font><a href=http://www.jdom.org/docs/apidocs/org/jdom/Namespace.html><font size=3 color=blue face="Courier New"><u>Namespace</u></font></a><font size=3 face="Courier New"> ns)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the textual content of the named child element, or returns null if there's no such child.</font>
<tr>
<td bgcolor=white valign=top><font size=2 face="Courier New"> java.lang.String</font>
<td bgcolor=white><a href=http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildTextNormalize(java.lang.String)><font size=3 color=blue face="Courier New"><b><u>getChildTextNormalize</u></b></font></a><font size=3 face="Courier New">(java.lang.String name)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the normalized textual content of the named child element, or returns null if there's no such child.</font>
<tr>
<td bgcolor=white valign=top><font size=2 face="Courier New"> java.lang.String</font>
<td bgcolor=white><a href="http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildTextNormalize(java.lang.String, org.jdom.Namespace)"><font size=3 color=blue face="Courier New"><b><u>getChildTextNormalize</u></b></font></a><font size=3 face="Courier New">(java.lang.String name, </font><a href=http://www.jdom.org/docs/apidocs/org/jdom/Namespace.html><font size=3 color=blue face="Courier New"><u>Namespace</u></font></a><font size=3 face="Courier New"> ns)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the normalized textual content of the named child element, or returns null if there's no such child.</font>
<tr>
<td bgcolor=white valign=top><font size=2 face="Courier New"> java.lang.String</font>
<td bgcolor=white><a href=http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildTextTrim(java.lang.String)><font size=3 color=blue face="Courier New"><b><u>getChildTextTrim</u></b></font></a><font size=3 face="Courier New">(java.lang.String name)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the trimmed textual content of the named child element, or returns null if there's no such child.</font>
<tr>
<td bgcolor=white valign=top><font size=2 face="Courier New"> java.lang.String</font>
<td bgcolor=white><a href="http://www.jdom.org/docs/apidocs/org/jdom/Element.html#getChildTextTrim(java.lang.String, org.jdom.Namespace)"><font size=3 color=blue face="Courier New"><b><u>getChildTextTrim</u></b></font></a><font size=3 face="Courier New">(java.lang.String name, </font><a href=http://www.jdom.org/docs/apidocs/org/jdom/Namespace.html><font size=3 color=blue face="Courier New"><u>Namespace</u></font></a><font size=3 face="Courier New"> ns)</font><font size=3 face="Times New Roman"> <br>
This convenience method returns the trimmed textual content of the named child element, or returns null if there's no such child.</font></table>
<br><font size=2 face="sans-serif"><br>
<br>
/Phill<br>
IS Dept, Software Engineer.<br>
phill_perryman@mitel.com<br>
http://www.mitel.com<br>
Tel: +44 1291 436023</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Bryan Thale <bryan.thale@motorola.com></b></font>
<br><font size=1 face="sans-serif">Sent by: jdom-interest-admin@jdom.org</font>
<p><font size=1 face="sans-serif">15/07/2003 19:12</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: jdom-interest@jdom.org</font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Subject: Re: [jdom-interest] new element methods?</font></table>
<br>
<br>
<br><font size=2 face="Courier New">><br>
><br>
>Essentially, his getXXX methods also take a default value that it returns in<br>
>the case where it fails...<br>
> <br>
><br>
<br>
An improvement, but I'd still maintain that such app dependent <br>
considerations are best kept out of JDOM proper.<br>
<br>
Bryan.<br>
<br>
-- <br>
Bryan Thale<br>
Networks & Infrastructure Research, Motorola Labs<br>
mailto:bryan.thale@motorola.com<br>
<br>
<br>
_______________________________________________<br>
To control your jdom-interest membership:<br>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com<br>
</font>
<br>
<br>