dap4/d4core/src/main/java/dap4/core/dmr/parser/DOM4Parser.java
protected void
    parseresponse(Node root)
            throws ParseException
    {
        String elemname = root.getNodeName();
        if(elemname.equalsIgnoreCase("Error")) {
            parseerror(root);
        } else if(elemname.equalsIgnoreCase("Dataset")) {
            parsedataset(root);
        } else
            throw new ParseException("Unexpected response root: " + elemname);
    }
protected void
    parseresponse(Node root)
            throws ParseException
    {
        String elemname = root.getNodeName();
        if(elemname.equalsIgnoreCase("Error")) {
            parseerror(root);
        } else if(elemname.equalsIgnoreCase("Dataset")) {
            parsedataset(root);
        } else
            throw new ParseException("Unexpected response root: " + elemname);
    }
Recursive descent parser