Class XMLEntityResolver

  • All Implemented Interfaces:
    EntityResolver

    public class XMLEntityResolver
    extends Object
    implements EntityResolver
    Handles the interaction with JAXP, resolving dtd, schemas locally if possible. Get a javax.xml.parsers.DocumentBuilder from here, allows you to validate or not.

    The Crimson parser wont do schema validation. NOTE: OLD AND CRUFTY

    • Constructor Detail

      • XMLEntityResolver

        public XMLEntityResolver​(boolean validate)
    • Method Detail

      • getExternalSchemas

        public static String getExternalSchemas()
      • initEntity

        public static void initEntity​(String entityName,
                                      String resourceName,
                                      String urlName)
        Add an entity for resolution. Specify a local resource, and/or a URL. Look for the local Resource first.
        Parameters:
        entityName - name of entity, eg the namespace String
        resourceName - resolve using this Resource, found on the class path
        urlName - resolve using this Resource, found on the class path
      • getDocumentBuilderFactoryVersion

        public static String getDocumentBuilderFactoryVersion()
      • getSAXBuilder

        public org.jdom2.input.SAXBuilder getSAXBuilder()