[jdom-interest] direct access to an arbitrary element----can I do this??

Ladhani, Dilip dladhani at gltg.com
Fri May 3 08:49:58 PDT 2002


Hey guys,
 
I have a simple operation to do. I am not sure how I can do this using Jdom. I have an XML that I get from on of our vendors. It kinda looks like this
<?xml version="1.0" encoding="ISO-8859-1" ?>
<abc>
     <def>
           <ghi>
               <jkl>
                      <mno>
                                <pqr>1111</pqr> 
                                <rst>2222</rst> 
                                <uvw>3333</uvw>                                       
                       </mno> 
               </jkl>
           </ghi>
     </def>
</abc>
 
Can I directly read the data in the tags pqr, rst, uvw etc or do I have to keep doing getchild() until I reach the tag mno to do anything meaningful. In short how can I access a tag somewhere in the xml tree by tag name.
 
 
Thanks, Your help is appreciated.
 



More information about the jdom-interest mailing list