Class NodeEntityResolver

  • All Implemented Interfaces:
    org.xml.sax.EntityResolver

    public class NodeEntityResolver
    extends java.lang.Object
    implements org.xml.sax.EntityResolver
    Provides specialised XML entity resolution for data nodes. As well as the local copies of some useful entities provided by the superclass StarEntityResolver any entity which is retrieved using a URL by this entity resolver is cached for future use for the case in which, for instance, multiple files in the same directory reference the same external entity. Done this way, you don't have to keep making network connections, you keep a copy of the items you retrieve. Obviously, there is a down side, you can fill up memory with things that you're not going to need again. Try it like this for now.
    • Method Detail

      • getInstance

        public static NodeEntityResolver getInstance()
        Returns the sole instance of this singleton class.
      • resolveEntity

        public org.xml.sax.InputSource resolveEntity​(java.lang.String publicId,
                                                     java.lang.String systemId)
                                              throws org.xml.sax.SAXException,
                                                     java.io.IOException
        Specified by:
        resolveEntity in interface org.xml.sax.EntityResolver
        Throws:
        org.xml.sax.SAXException
        java.io.IOException