opendap/src/main/java/opendap/dap/parsers/DDSXMLParser.java
public void parse(InputStream is, DDS targetDDS, BaseTypeFactory fac, boolean validation) throws DAP2Exception {


        try {

            // get a jdom parser to parse and validate the XML document.
            SAXBuilder parser = new SAXBuilder();
            // optionally turn on validation
            parser.setFeature("http://apache.org/xml/features/validation/schema", validation);

            // parse the document into a hierarchical document
            Document doc = parser.build(is);

            if (_Debug) System.out.println("Document is " +
                    (validation ? "valid and " : "") +
                    "well-formed.\nContent: " + doc);

            parse(doc, targetDDS, fac, validation);

        } catch (JDOMException jde) {
            throw new DAP2Exception(jde);
        }
        catch (IOException ioe) {
            throw new DAP2Exception(ioe);
        }


    }
public void parse(InputStream is, DDS targetDDS, BaseTypeFactory fac, boolean validation) throws DAP2Exception {


        try {

            // get a jdom parser to parse and validate the XML document.
            SAXBuilder parser = new SAXBuilder();
            // optionally turn on validation
            parser.setFeature("http://apache.org/xml/features/validation/schema", validation);

            // parse the document into a hierarchical document
            Document doc = parser.build(is);

            if (_Debug) System.out.println("Document is " +
                    (validation ? "valid and " : "") +
                    "well-formed.\nContent: " + doc);

            parse(doc, targetDDS, fac, validation);

        } catch (JDOMException jde) {
            throw new DAP2Exception(jde);
        }
        catch (IOException ioe) {
            throw new DAP2Exception(ioe);
        }


    }
public void parse ( InputStream is , DDS targetDDS , BaseTypeFactory fac , boolean validation ) throws DAP2Exception { try { // get a jdom parser to parse and validate the XML document.
 SAXBuilder parser = new SAXBuilder ( ) ; // optionally turn on validation
 parser . setFeature ( "http://apache.org/xml/features/validation/schema" , validation ) ; // parse the document into a hierarchical document
 Document doc = parser . build ( is ) ; if ( _Debug ) System . out . println ( "Document is " + ( validation ? "valid and " : "" ) + "well-formed.\nContent: " + doc ) ; parse ( doc , targetDDS , fac , validation ) ; } catch ( JDOMException jde ) { throw new DAP2Exception ( jde ) ; } catch ( IOException ioe ) { throw new DAP2Exception ( ioe ) ; } }
Parse the DDX waiting in the <code>InputStream</code> and instantiate all of
the member <code>BaseType</code> variables and their associated <code>Attributes
</code> into a <code>DDS</code> using the passed <code>BaseTypeFactory</code>

@param is         The <code>InputStream</code> containing the DDX to parse.
@param targetDDS  The <code>DDS</code> in which to place all of the <code>BaseType
</code> variables and their associated <code>Attributes</code>.
@param fac        The <code>BaseTypeFactory</code> to use when creating new
<code>BaseType</code> variables.
@param validation Is a boolean indicating whether or not the parser should
validate the XML document using the Schema (typically referenced in the
document itself). In general server side applications should always vaidate,
while clients shouldn't bother (since they are ostensibly receiving the
document from a server that has already done so.)
@see DDS
@see BaseTypeFactory
Parse the DDX waiting in the <code > InputStream< / code > and instantiate all of the member <code > BaseType< / code > variables and their associated <code > Attributes < / code > into a <code > DDS< / code > using the passed <code > BaseTypeFactory< / code >