[jdom-interest] recursive getAllChildren()

Peter Wood spurryjdom at operamail.com
Thu Jun 7 21:01:40 PDT 2001


I want to "getAllChildren()" but I assumed that this would be recursive, so 
that all the grandkiddies and great-grandkiddies would *all* be included.

This is because I know that somewhere in this particular XML file that there 
is a single tag called <a>. I don't know how deep it is or what it's parent is 
(maybe that's too slack of me ?) - I just wanted that value of <a> - even if 
it was just the first instance of it.

I suppose the problem that this may cause is multiple elements with the same 
name in the one "List" and therefore subsequent retrievals will become 

Can anyone help me by explaining why this method either isn't recursive (or 
why getMixedContent() isn't recursive rather) Maybe this will help solidify my 
understanding. If it is obvious my understanding of XML is too slack then just 
point this out and I will read some more.

Peter vdW

More information about the jdom-interest mailing list