Package org.apache.xerces.parsers

Examples of org.apache.xerces.parsers.XML11Configuration


                return parser;
            }
        }
        // REVISIT:  when schema handles XML 1.1, will need to
        // revisit this (and the practice of not prepending an XML decl to the annotation string
        XML11Configuration config = new XML11Configuration(fSymbolTable);
        // note that this should never produce errors or require
        // entity resolution, so just a barebones configuration with
        // a couple of feature  set will do fine
        config.setFeature(Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE, true);
        config.setFeature(Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE, false);
        SAXParser parser = new SAXParser(config);
        fSAXParser = new SoftReference(parser);
        return parser;
    }
View Full Code Here


   * @throws SAXNotSupportedException
   */
  public static XMLReader createValidatingReader() throws IOException, SAXNotRecognizedException, SAXNotSupportedException {
    String validationFeature = "http://xml.org/sax/features/validation";
    String schemaFeature = "http://apache.org/xml/features/validation/schema";
    XML11Configuration config = new XML11Configuration();
    config.setEntityResolver(EDISchemaEntityManager.createInstance());
    XMLReader result = new SAXParser(config);
    result.setFeature(validationFeature, true);
    result.setFeature(schemaFeature, true);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.apache.xerces.parsers.XML11Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.