[jdom-interest] getAttributeValue(): wrong signatures?

Elliotte Rusty Harold elharo at metalab.unc.edu
Tue Apr 30 11:03:41 PDT 2002


At 1:36 PM -0400 4/30/02, Alex Rosen wrote:


>Except for getChild(String name, Namespace ns) and friends. Are you
>proposing that we change all of these?
>

Oh, yuck. I find this stuff as I write about it and that's in the 
last section I haven't written yet. And honestly I've been avoiding 
it because I find all that getChildren() vs getContent() vs. 
getChild() vs. getChildText() vs. getchildTextTrim() vs. 
getChildTextNormalize() vs. getOldestChild() vs. 
getSeventhSonOfASeventhSon()  to be deeply troubling and often just 
plain incorrect.

I guess I am proposing that we change all of them then. At least in 
these methods there's no conflict with strings used as default values 
vs. strings used as namespace URIs. Using the Namespace class does 
have the advantage of catching a mistake where someone flips the 
order of the arguments.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list