goja-core/src/main/java/goja/core/libs/XML.java
public static Document getDocument(File file) {
        try {
            return newDocumentBuilder().parse(file);
        } catch (SAXException e) {
            logger.warn("Parsing error when building Document object from xml file '" + file + "'.", e);
        } catch (IOException e) {
            logger.warn("Reading error when building Document object from xml file '" + file + "'.", e);
        }
        return null;
    }
public static Document getDocument(File file) {
        try {
            return newDocumentBuilder().parse(file);
        } catch (SAXException e) {
            logger.warn("Parsing error when building Document object from xml file '" + file + "'.", e);
        } catch (IOException e) {
            logger.warn("Reading error when building Document object from xml file '" + file + "'.", e);
        }
        return null;
    }
Parse an XML file to DOM

@return null if an error occurs during parsing.