[jdom-interest] Children list
bob mcwhirter
bob at werken.com
Wed Mar 14 16:25:44 PST 2001
First, your indentation seems to lend semantics that
aren't there. e1, e2, e3, and e4 are all first-level
children of the root node, but your indentation
somewhat makes it appear that e2 and e3 are children
of e1.
2nd, sure, there are ways to get sublists. What is
your rule for selecting which elements you want in the
sublist? Can you make a sentence-type rule, similar to
"all but the first element", or "all elements whose position
is a prime number", or something similar?
If your criteria is arbitrary, no amount of code can
help, save maybe invokation of Randomizer or something.
Basically, which elements fall into the set of "certain elements"
that you wish to skip?
Lastly, are you familiar with XPath? It might could help.
-bob
On Wed, 14 Mar 2001, Corcos Igal wrote:
> Is there a way in JDOM to get all the children of an element but skipping
> certain elements?
>
> For example,
>
> given:
> <root>
> <e1></e1>
> <e2></e2>
> <e3></e3>
> <e4></e4>
> </root>
>
> Is there a way to get e2, e3, and e4 in a list that we can iterate through?
>
> If not, does anyone have any suggestions on how one might accomplish this
> task?
>
> Thanks.
>
> -Igal Corcos
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
>
More information about the jdom-interest
mailing list