Package org.xml.sax

Examples of org.xml.sax.EntityResolver


                    throw new ConfigInitializationException("Validation errors occurred parsing the config file \"" +
                        resourcePath + "\".  Cause: " + exception, exception);
                }
            });

            db.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) {
                    if(systemId.endsWith("/beehive-netui-config.xsd")) {
                        InputStream inputStream = NetUIConfigParser.class.getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
                        return new InputSource(inputStream);
                    }
View Full Code Here


                    public void fatalError(SAXParseException exception) {
                        _log.error("Validation errors occurred parsing the config file \"" + _configFilePath + "\".  Cause: " + exception, exception);
                    }
                });

                db.setEntityResolver(new EntityResolver() {
                    public InputSource resolveEntity(String publicId, String systemId) {
                        if(systemId.endsWith("/url-template-config.xsd")) {
                            InputStream inputStream = DefaultURLTemplatesFactory.class.getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
                            return new InputSource(inputStream);
                        }
View Full Code Here

//                    XMLReader xliffreader = XMLReaderFactory
//                            .createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
                    xliffreader.setErrorHandler(contentHandler);
                    xliffreader.setContentHandler(contentHandler);
                    /* one possibility to resolve an extern entity (DTD) */
                    EntityResolver res = new Resolver();
                    xliffreader.setEntityResolver(res);
                    /*
                     * a second possibility to resolve an extern entity (DTD)
                     *
                     * xliffreader.setFeature("xml.org/sax/features/validation",true);
 
View Full Code Here

     *         has been registered.
     * @see #setEntityResolver
     */
    public EntityResolver getEntityResolver() {

        EntityResolver entityResolver = null;
        try {
            XMLEntityResolver xmlEntityResolver =
                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
            if (xmlEntityResolver != null &&
                xmlEntityResolver instanceof EntityResolverWrapper) {
View Full Code Here

        // build the in-memory type system
        state = StscState.start();
        // construct the state (have to initialize early in case of errors)
        state.setErrorListener(errorListener);

        EntityResolver cmdLineEntRes = ResolverUtil.resolverForCatalog(catalog);
        typeSystem = loadTypeSystem(wsdl,
                                     bindingFiles,
                                     null,
                                     null,
                                     null,
View Full Code Here

               return source;
            }
         }

         // first try to resolve using user's entity resolver
         EntityResolver resolver = fEntityHandler.getEntityResolver();
         if (resolver != null) {
            InputSource source = resolver.resolveEntity(publicId, systemId);
            if (source != null) {
               return source;
            }
         }
View Full Code Here

    Digester dig = new Digester();
    dig.setDocumentLocator(new LocatorImpl());
    // Disable xml validations at all - web.xml already validated by
    // container
    dig.setValidating(false);
    dig.setEntityResolver(new EntityResolver() {
      // Dummi resolver - alvays do nothing
      public InputSource resolveEntity(String publicId, String systemId)
          throws SAXException, IOException {
        return new InputSource(new StringReader(""));
      }
View Full Code Here

      InputStream in = URLToStreamHelper.urlToStream(resourceConfig);
      try {
        Digester digester = new Digester();
        digester.setValidating(false);
        digester.setEntityResolver(new EntityResolver() {
          // Dummi resolver - alvays do nothing
          public InputSource resolveEntity(String publicId,
              String systemId) throws SAXException, IOException {
            return new InputSource(new StringReader(""));
          }
View Full Code Here

        final Digester d = new Digester();

        System.out.println( "Parsing file " + input.getAbsolutePath() );

        d.setEntityResolver(
                new EntityResolver()
                {
                    public InputSource resolveEntity(
                            String publicId,
                            String systemId
                    )
View Full Code Here

        try
        {
            // Parse the input
            XMLReader reader = getXMLReaderCached();
            reader.setEntityResolver(
                new EntityResolver()
                {
                    public InputSource resolveEntity(String publicId, String systemId)
                    {
                        //Ignore all DTDs
                        return new InputSource(new ByteArrayInputStream(new byte[0]));
View Full Code Here

TOP

Related Classes of org.xml.sax.EntityResolver

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.