dap4/d4core/src/main/java/dap4/core/dmr/parser/DOM4Parser.java
public boolean
    parse(String input)
            throws SAXException
    {
        try {
            DocumentBuilderFactory domfactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dombuilder = domfactory.newDocumentBuilder();
            StringReader rdr = new StringReader(input);
            InputSource src = new InputSource(rdr);
            Document doc = dombuilder.parse(src);
            doc.getDocumentElement().normalize();
            rdr.close();
            parseresponse(doc.getDocumentElement());
            return true;
        } catch (ParserConfigurationException | IOException e) {
            throw new SAXException(e);
        }
    }
public boolean
    parse(String input)
            throws SAXException
    {
        try {
            DocumentBuilderFactory domfactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dombuilder = domfactory.newDocumentBuilder();
            StringReader rdr = new StringReader(input);
            InputSource src = new InputSource(rdr);
            Document doc = dombuilder.parse(src);
            doc.getDocumentElement().normalize();
            rdr.close();
            parseresponse(doc.getDocumentElement());
            return true;
        } catch (ParserConfigurationException | IOException e) {
            throw new SAXException(e);
        }
    }
Parser API