Package org.jboss.util.xml

Examples of org.jboss.util.xml.JBossEntityResolver


      log.debugf("Parsing: %1s", file.getName());
     
      InputSource source = new VFSInputSource(file);
      DocumentBuilderFactory factory = getDocumentBuilderFactory();
      DocumentBuilder parser = factory.newDocumentBuilder();
      parser.setEntityResolver(new JBossEntityResolver());
      return parser.parse(source);
   }
View Full Code Here


      try
      {
         dbf.setValidating(true);

         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         JBossEntityResolver resolver = new JBossEntityResolver();
         resolver.registerLocalEntity("urn:jboss:jdklogger.dtd", "jdklogger.dtd");
         docBuilder.setEntityResolver(resolver);

         Document doc = action.parse(docBuilder);
         parse(doc.getDocumentElement());
      }
View Full Code Here

      try
      {
         dbf.setValidating(true);

         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         JBossEntityResolver resolver = new JBossEntityResolver();
         resolver.registerLocalEntity("urn:jboss:jdklogger.dtd", "jdklogger.dtd");
         docBuilder.setEntityResolver(resolver);

         Document doc = action.parse(docBuilder);
         parse(doc.getDocumentElement());
      }
View Full Code Here

            if (metaTmpFile == null)
                throw new IOException(MESSAGES.deploymentPlanDoesNotContainEntry(DeploymentMetaData.ENTRY_NAME));

            try {
                SAXReader reader = new SAXReader();
                reader.setEntityResolver(new JBossEntityResolver());

                Document metaDoc = reader.read(metaTmpFile);
                metaData = new DeploymentMetaData(metaDoc);
                ROOT_LOGGER.debugf(DeploymentMetaData.ENTRY_NAME + "\n" + metaData.toXMLString());
            } catch (Exception e) {
View Full Code Here

         log.debug("found ejb-jar.xml " + ddResource);

         factory = new EjbJarDDObjectFactory();
         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
         unmarshaller = unmarshallerFactory.newUnmarshaller();
         unmarshaller.setEntityResolver(new JBossEntityResolver());
         unmarshaller.setNamespaceAware(true);
         unmarshaller.setSchemaValidation(true);
         unmarshaller.setValidation(true);

         dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
View Full Code Here

      try
      {
         dbf.setValidating(true);

         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
         JBossEntityResolver resolver = new JBossEntityResolver();
         resolver.registerLocalEntity("urn:jboss:jdklogger.dtd", "jdklogger.dtd");
         docBuilder.setEntityResolver(resolver);

         Document doc = action.parse(docBuilder);
         parse(doc.getDocumentElement());
      }
View Full Code Here

      throws JBossXBException
   {
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(EjbJar21MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (EjbJar21MetaData) unmarshaller.unmarshal(ejbJarXml, schema);
   }
View Full Code Here

      throws JBossXBException
   {
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(Web24MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (WebMetaData) unmarshaller.unmarshal(webxml, schema);
   }
View Full Code Here

   {
      SchemaBinding schema = JBossXBBuilder.build(ServerMetaData.class);
      Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
      u.setSchemaValidation(false);
      u.setValidation(false);
      u.setEntityResolver(new JBossEntityResolver());

      InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("test/metadata/server.xml");

      ServerMetaData m = ServerMetaData.class.cast(u.unmarshal(is, schema));
      assertNotNull(m);
View Full Code Here

         InputStream stream = url.openStream();
         try
         {
            InputSource is = new InputSource(stream);
            is.setSystemId(url.toString());
            parser.setEntityResolver(new JBossEntityResolver());
            log.debug("Initialized parsing in " + (System.currentTimeMillis() - start) + "ms");

            Document document = parser.parse(is);
            element = document.getDocumentElement();
         }
View Full Code Here

TOP

Related Classes of org.jboss.util.xml.JBossEntityResolver

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.