List of utility methods to do XML DOM from File
Document | file2Dom(File file) file Dom return docBuilder.parse(file);
|
Document | fileToDOM(File file) file To DOM DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
return docBuilder.parse(file);
|
Document | fileToDom(String fileName) file To Dom try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); return factory.newDocumentBuilder().parse(new File(fileName)); } catch (Exception e) { e.printStackTrace(); return null; |