docs: private Document getDOMObject(String filename, boolean validating)
  			throws SAXException, IOException, ParserConfigurationException {
  
  		// Create a builder factory
  
  		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  		if (!validating) {
  			factory.setValidating(validating);
  			factory.setSchema(null);
  			factory.setNamespaceAware(false);
  		}
  
  		DocumentBuilder builder = factory.newDocumentBuilder();
  		// Create the builder and parse the file
  		Document doc = builder.parse(new File(filename));
  		return doc;
  	}