[jdom-interest] short question

Jason Hunter jhunter at collab.net
Mon Aug 6 15:08:16 PDT 2001


getChildren() returns a list, so just use an iterator.next() or get(1)
to fetch the second child element.

-jh-

vincent leycuras wrote:
> 
> Hi all,
> 
> I am in the process of writing a small app that retrieves information using
> the following scheme from an XML document:
> 
> every identical node (same name, same type) represents a line, and its
> children represent a column. For example:
> 
> <parent>
>   <child1>blob</child1>
>   <child2>blabla</child2>
> </parent>
> <parent>
>   <child1>sdf</child1>
>   <child2>fdsg</child2>
> </parent>
> ... and so on. Here, I want the result to be:
>          Col1 | Col2
> line 1 | blob | blabla
> line 2 | sdf  | fdsg
> 
> ... But I couldn't find out how to access the second "parent" node.
> 
> Any help gladly welcome!
> 
> BTW, this package is brilliant ;-P.
> 
> Cheers, Vincent.
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> _______________________________________________
> 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