try {
DOMParser p = new DOMParser();
p.setFeature("http://xml.org/sax/features/validation", true);
p.parse(fileName);
doc = p.getDocument();
doc.normalize();
System.out.println("Parse success.. " + fileName);
} catch (Exception e) {
System.out.println(fileName + ": Parse error: " + e);
doc = null;
}