[jdom-interest] (no subject)

Jason Hunter jhunter at servlets.com
Sun Oct 21 12:11:50 PDT 2001


If you read the FAQ, you'll see you can use XPath with JDOM quite
easily, thanks to Jaxen and the work of Bob McWhirter.

-jh-

Jason Long wrote:
> 
> I am working on a program that catalog internal file properties and loggs
> them in XML.  I previously believed that I could make the assumption that
> the structure of the XML could have a direct correlation with the directory
> structure of the file, but this is no longer valid.  Here is an example of
> of my structure:
> 
> <CD_Library>
>   <artist name="artist 1">
>     <album title="album 1">
>       <tract number="1" title="title 1" />
>       <tract number="2" title="title 2" />
>     </album>
>   </artist>
>   <artist name="artist 2">
>     <album title="album 1">
>       <tract number="1" title="title 1" />
>       <tract number="2" title="title 2" />
>     </album>
>   </artist>
> </CD_Library>
> 
> I would like to check if an artist/album exists with a given name and either
> add it to the root or under the appropiate node.  I know how to do this with
> XPath, but is there a way to do this using JDOM?
> 
> Jason Long
> JML Internet Enterprises - www.jmlie.com
> BS Physics, MS Chemical Engineering
> 
> _______________________________________________
> 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