I have the following code:
<ishfields>
<ishfield name="FTITLE" level="logical">3* Family map</ishfield>
<ishfield name="FDESCRIPTION" level="logical">111</ishfield>
<ishfield name="FCHANGES" level="version" />
</ishfields>
I want to get the text content of field name="FDESCRIPTION".
i am not even able to fetch the content 111.
I have used getelementsbytagname() and many approaches. Can anyone help how to do this? here is my java code:
try {
String file="E:\\Repository\\17Nov_demo\\file.xml";
DocumentBuilderFactory documentbuilderfactory=DocumentBuilderFactory.newInstance();
DocumentBuilder documentbuilder =documentbuilderfactory.newDocumentBuilder();
Document doc=documentbuilder.parse(file);
Element element=doc.getDocumentElement();
NodeList nodelist=element.getChildNodes();
for (int i = 0; i < nodelist.getLength(); i++) {
System.out.println(nodelist);
}
}
catch(Exception e)
{
}
i know it will only fetch the entire document nodes. But i cannot understand how to go to that particular node uing xpath or whatever. please help!!