public DOMBuilderImpl(XMLParserConfiguration config) { super(config);   final String[] domRecognizedFeatures = { Constants.DOM_CANONICAL_FORM, Constants.DOM_CDATA_SECTIONS, Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING, Constants.DOM_INFOSET, Constants.DOM_NAMESPACE_DECLARATIONS, Constants.DOM_SUPPORTED_MEDIATYPES_ONLY, Constants.DOM_CERTIFIED, };
public DOMBuilderImpl(String configuration, String schemaType) { this( (XMLParserConfiguration) ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", configuration)); if (schemaType != null) { if (schemaType.equals(Constants.NS_DTD)) { fConfiguration.setFeature( Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE, false); fConfiguration.setProperty( Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE, Constants.NS_DTD); fSchemaType = Constants.NS_DTD; } else if (schemaType.equals(Constants.NS_XMLSCHEMA)) {  fConfiguration.setProperty( Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE, Constants.NS_XMLSCHEMA); } }
    public DOMBuilderImpl(XMLParserConfiguration config) {        super(config);                // add recognized features        final String[] domRecognizedFeatures = {            Constants.DOM_CANONICAL_FORM,            Constants.DOM_CDATA_SECTIONS,            Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING,            Constants.DOM_INFOSET,            Constants.DOM_NAMESPACE_DECLARATIONS,            Constants.DOM_SUPPORTED_MEDIATYPES_ONLY,            Constants.DOM_CERTIFIED,        };        fConfiguration.addRecognizedFeatures(domRecognizedFeatures);        // turn off deferred DOM        fConfiguration.setFeature(DEFER_NODE_EXPANSION, false);                // set default values        fConfiguration.setFeature(Constants.DOM_CANONICAL_FORM, false);        fConfiguration.setFeature(Constants.DOM_CDATA_SECTIONS, true);        fConfiguration.setFeature(Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING, true);        fConfiguration.setFeature(Constants.DOM_INFOSET, false);        fConfiguration.setFeature(Constants.DOM_NAMESPACE_DECLARATIONS, true);        fConfiguration.setFeature(Constants.DOM_SUPPORTED_MEDIATYPES_ONLY, false);                // REVISIT: by default Xerces assumes that input is certified.        //          default is different from the one specified in the DOM spec        fConfiguration.setFeature(Constants.DOM_CERTIFIED, true);        // Xerces datatype-normalization feature is on by default        fConfiguration.setFeature( NORMALIZE_DATA, false );     } // <init>(XMLParserConfiguration)