Core/src/main/java/org/openestate/io/core/XmlUtils.java
public static Document newDocument(File xmlFile, boolean namespaceAware) throws SAXException, IOException, ParserConfigurationException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(namespaceAware);
        DocumentBuilder builder = factory.newDocumentBuilder();
        return builder.parse(xmlFile);
    }
public static Document newDocument(File xmlFile, boolean namespaceAware) throws SAXException, IOException, ParserConfigurationException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(namespaceAware);
        DocumentBuilder builder = factory.newDocumentBuilder();
        return builder.parse(xmlFile);
    }
public static Document newDocument ( File xmlFile , boolean namespaceAware ) throws SAXException , IOException , ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; factory . setNamespaceAware ( namespaceAware ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; return builder . parse ( xmlFile ) ; }
Create a {@link Document} from a {@link File}.

@param xmlFile        the XML file, the document is created from
@param namespaceAware if namespaces are used in the created document
@return created document
@throws SAXException                 if XML contains an error
@throws IOException                  if XML is not readable
@throws ParserConfigurationException if the parser is not properly configured
Create a { @link Document } from a { @link File } .