List of utility methods to do XML Document from File
String | ReadXMLFile1(String in_FileName, String in_TagName) Read XML File DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(in_FileName);
Element root = doc.getDocumentElement();
return GetParStrValue(root, in_TagName);
|
String | ReadXMLFile3(String in_FileName, String in_TagName) Read XML File String strOut = ""; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(in_FileName); Element root = doc.getDocumentElement(); NodeList books = root.getChildNodes(); if (books != null) { for (int i = 0; i < books.getLength(); i++) { ... |