[jdom-interest] getMixedContent -> getContent

guru at stinky.com guru at stinky.com
Wed Jun 27 16:34:13 PDT 2001

On Wed, Jun 27, 2001 at 01:04:23PM -0700, Jason Hunter wrote:
> > Yes, it's always been so.  IMHO, we should do an s/Children/Elements/
> > on the API.
> No one took the bait so you're starting the debate on your own, eh?  :-)

Hey, if you hadn't replied I'd have rebutted myself. :-)

> Here's a little test to help answer the question:
> <root>
>   <!-- The sky is blue -->
>   <sky color="blue"/>
> </root>
> How many children does root have?  
> The current getChildren() naming model says it has one child.

But that hides the fact that there is also a whitespace node, a
comment node, another whitespace node, an element node, and yet
another whitespace node, that all have the root element as their
parent.  Doesn't this mean that parenthood and childhood are not
transitive?  If A is the parent of B, then B is the child of A, right?

 - Alex "I'm my own grandpa" Chaffee

> I could live with getElement() / getElements().  It just seems less
> appealing because then you're having to imply it's the first-level child
> elements that you're getting.

Same implication with all the other methods...  

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 mailing list