[jdom-interest] getChildren() vs getElements()
guru at edamame.stinky.com
Wed Sep 20 10:22:41 PDT 2000
> Actually, I went back and re-read the last set of emails and noticed
> getChildAttributes in Alex's proposal and my badly quoted +1 -
> getChildAttributes is undoubtedly wrong, under any spec. No spec describes
> an attribute as a child. This also explains Jason's -50. My mistake, I
> quoted more than I meant to above my +1.
Defensively: getChildAttributes() was not part of my proposal. I said
*IF* we go with getChildElements(), *THEN* we must go with
getChildAttributes() for consistency. I meant this as a
My proposal was in fact the opposite: to go with getElements() and
I think it would be ugly to to have getChildX and getY for all X, Y
where X and Y are similar concepts.
In fact, I'll go out on a limb and say that getChildren() is better
than getChildElements() -- conciseness wins over strict accuracy.
But getElements() has both.
Alex Chaffee mailto:alex at jguru.com
jGuru - Java News and FAQs http://www.jguru.com/alex/
Creator of Gamelan http://www.gamelan.com/
Founder of Purple Technology http://www.purpletech.com/
Curator of Stinky Art Collective http://www.stinky.com/
More information about the jdom-interest