goja-core/src/main/java/goja/core/libs/XML.java
public static Document getDocument(String xml) {
        InputSource source = new InputSource(new StringReader(xml));
        try {
            return newDocumentBuilder().parse(source);
        } catch (SAXException e) {
            logger.warn("Parsing error when building Document object from xml data.", e);
        } catch (IOException e) {
            logger.warn("Reading error when building Document object from xml data.", e);
        }
        return null;
    }
public static Document getDocument(String xml) {
        InputSource source = new InputSource(new StringReader(xml));
        try {
            return newDocumentBuilder().parse(source);
        } catch (SAXException e) {
            logger.warn("Parsing error when building Document object from xml data.", e);
        } catch (IOException e) {
            logger.warn("Reading error when building Document object from xml data.", e);
        }
        return null;
    }
public static Document getDocument ( String xml ) { InputSource source = new InputSource ( new StringReader ( xml ) ) ; try { return newDocumentBuilder ( ) . parse ( source ) ; } catch ( SAXException e ) { logger . warn ( "Parsing error when building Document object from xml data." , e ) ; } catch ( IOException e ) { logger . warn ( "Reading error when building Document object from xml data." , e ) ; } return null ; }
Parse an XML string content to DOM

@return null if an error occurs during parsing.
Parse an XML string content to DOM