Examples of SAXParserFactoryImpl


Examples of com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

  }

  // Inlined from guava-internal.
  private SAXParser createSAXParser()
      throws ParserConfigurationException, SAXException {
    SAXParserFactory factory = new SAXParserFactoryImpl();
    factory.setValidating(false);
    factory.setXIncludeAware(false);
    factory.setFeature(
        "http://xml.org/sax/features/external-general-entities", false);
    factory.setFeature(
        "http://xml.org/sax/features/external-parameter-entities",false);
    factory.setFeature(
        "http://apache.org/xml/features/nonvalidating/load-external-dtd",
        false);
    factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);

    SAXParser parser = factory.newSAXParser();
    XMLReader xmlReader = parser.getXMLReader();
    xmlReader.setEntityResolver(NOOP_RESOLVER);
    return parser;
  }
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

  /**
   * Constructs the SAX parser factory.
   */
  public SecureJDKXercesSAXFactory()
      throws ParserConfigurationException, SAXException {
    super(new SAXParserFactoryImpl());
  }
View Full Code Here

Examples of com.volantis.xml.xerces.jaxp.SAXParserFactoryImpl

public class XMLTestCaseHelper {

    public static XMLReader getXMLReader()
        throws ParserConfigurationException, SAXException {

        SAXParserFactory factory = new SAXParserFactoryImpl();
        factory.setNamespaceAware(true);
        SAXParser parser = factory.newSAXParser();      
        return parser.getXMLReader();
    }
View Full Code Here

Examples of mf.org.apache.xerces.jaxp.SAXParserFactoryImpl

    /**
     * Attaches the reader to the catalog.
     */
    private void attachReaderToCatalog (Catalog catalog) {

        SAXParserFactory spf = new SAXParserFactoryImpl();
        spf.setNamespaceAware(true);
        spf.setValidating(false);

        SAXCatalogReader saxReader = new SAXCatalogReader(spf);
        saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
            "org.apache.xml.resolver.readers.OASISXMLCatalogReader");
        catalog.addReader("application/xml", saxReader);
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

  }
  /**
   * Returns the SAXParserFactory used for constructing parsers.
   */
  private SAXParserFactory createParserFactory() {
    SAXParserFactory factory = new SAXParserFactoryImpl();
    factory.setXIncludeAware(getXIncludeSupported());
    return factory;
  }
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

    private void handleImport(InputStream is, DefaultHandler h) {
        try {
            SAXParserFactory factory;

            factory = new SAXParserFactoryImpl();

            factory.setNamespaceAware(true);
            factory.setValidating(false);
            factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

    public int detectXmlFormat(InputStream is) {
        XMLFormatDetectionHandler handler = new XMLFormatDetectionHandler();
        try {
            SAXParserFactory factory;

            factory = new SAXParserFactoryImpl();

            factory.setNamespaceAware(true);
            factory.setValidating(false);
            factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

        documentViewImportHandler.setUuidBehavior(uuidBehavior);
        documentViewImportHandler.setReplacements(replacements);
        try {
            SAXParserFactory factory;

            factory = new SAXParserFactoryImpl();

            factory.setNamespaceAware(true);
            factory.setValidating(false);
            factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

      if (schemadirs.size() > 0)
      {
        SAXParser saxParser = null;
        try
        {
          SAXParserFactory parserfactory = new SAXParserFactoryImpl();
          parserfactory.setFeature(_APACHE_FEATURE_NAMESPACE_PREFIXES, true);
          parserfactory.setFeature(_APACHE_FEATURE_NAMESPACES, true);
          saxParser = parserfactory.newSAXParser();
        }
        catch (FactoryConfigurationError e)
        {
        }
        catch (SAXNotRecognizedException e)
View Full Code Here

Examples of org.apache.xerces.jaxp.SAXParserFactoryImpl

   * the mix.
   * </p>
   * @return the Xerces-specific implementaiton
   */
  public static SAXParserFactory getSAXParserFactory() {
    return new SAXParserFactoryImpl();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.