Examples of XMLResolvingService


Examples of org.exoplatform.services.xml.resolving.XMLResolvingService

   {
      StandaloneContainer.setConfigurationPath(Thread.currentThread().getContextClassLoader().getResource(
         "conf/standalone/test-configuration.xml").getPath());
      StandaloneContainer container = StandaloneContainer.getInstance();

      XMLResolvingService resolvingService =
         (XMLResolvingService)container.getComponentInstanceOfType(XMLResolvingService.class);
      assertNotNull("XMLResolvingService", resolvingService);

      XMLReader xmlReader = XMLReaderFactory.createXMLReader();
      xmlReader.setEntityResolver(resolvingService.getEntityResolver());

      assertNotNull("resolvingService.getEntityResolver()", resolvingService.getEntityResolver());

      InputSource src =
         resolvingService.getEntityResolver().resolveEntity("-//W3C//DTD XHTML 1.0 Transitional//EN",
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");

      assertNotNull("Not resolved InputSource entity", src);

      xmlReader.setFeature("http://xml.org/sax/features/validation", true); // validation
View Full Code Here

Examples of org.exoplatform.services.xml.resolving.XMLResolvingService

   {
      StandaloneContainer.setConfigurationPath(Thread.currentThread().getContextClassLoader().getResource(
         "conf/standalone/test-configuration.xml").getPath());
      StandaloneContainer container = StandaloneContainer.getInstance();

      XMLResolvingService resolvingService =
         (XMLResolvingService)container.getComponentInstanceOfType(XMLResolvingService.class);
      assertNotNull("XMLResolvingService", resolvingService);

      XMLReader xmlReader = XMLReaderFactory.createXMLReader();
      xmlReader.setEntityResolver(resolvingService.getEntityResolver());

      assertNotNull("resolvingService.getEntityResolver()", resolvingService.getEntityResolver());

      log.info("resolvingService class is " + resolvingService.getClass().getName());

      InputSource src =
         resolvingService.getEntityResolver().resolveEntity("-//W3C//DTD XHTML 1.0 Transitional//EN",
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");

      log.info(src.getSystemId());
      assertNotNull("Not resolved InputSource entity", src);
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.