I need to parser an Xml Document and store the values in Text File, when i am parsing normal data (If all tags have data) then its working fine, but if any tag doesnt have d
Replace
System.out.println("First Name : " + getTagValue("firstname", eElement));
by
System.out.println("First Name : " + getTagValue("firstname", eElement) == null?"":getTagValue("firstname", eElement));
same thing for the other tags.