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

@param xmlSource      the XML input, 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