Nov 10

DocumentBuilderFactory factory = 
   DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(file); 
// or if you need to specify an encoding explitily
// Document document = builder.parse(
//   new InputStreamReader(new FileInputStream(file), encoding)); 

written by objects \\ tags: , , ,