Java Mailing List Archive

Home » Home (12/2007) » JDOM User »

[jdom-interest] getting null value of node while retrieving from
 xml file

nageswara rao



Here is my code snippet:

public static void main(String args[]){
       File f=new File(args[0]);
       Document xmldoc=builder.parse(new InputSource(new
       System.out.println("Document type is : "+xmldoc.getDoctype());
       NodeList recordslist=xmldoc.getElementsByTagName("FirstName");
       for(int i=0;i<recordslist.getLength();i++)
       Node record=recordslist.item(i);

       System.out.println(" Record: "+i+" :\t"+record.getNodeValue());

   catch (Exception e)

Thanks and Regards

G.Nageswara Rao
mobile: 09833763993
mail : nageswara.rao@(protected)

This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at
To control your jdom-interest membership:
©2008 - Jax Systems, LLC, U.S.A.