Interface Loader

  • All Known Implementing Classes:
    LoaderImpl, XLoader

    public interface Loader
    A W3C DOM document loader service.
    • Method Detail

      • setConsole

        void setConsole​(Console c)
        Specifies the console on which messages issued during document loading are to be displayed.
        Parameters:
        c - the console; may be null, in which case messages are displayed on System.err and System.out
        See Also:
        getConsole()
      • setEntityResolver

        void setEntityResolver​(EntityResolver resolver)
        Specifies which entity resolver to use when loading an XML document.
        Parameters:
        resolver - which resolver to use. May be null.
        See Also:
        getEntityResolver()
      • load

        Document load​(InputStream in,
                      URL url)
               throws IOException
        Load document from specified input stream.

        Note: xi:include elements (XInclude) are expected to have been processed in the loaded document.

        Parameters:
        in - input stream allowing to load the document
        url - URL of the document to be loaded if known; null otherwise
        Returns:
        loaded document
        Throws:
        IOException - if, for any reason, an I/O exception is raised during the processing. Note that XML parse exception and XInclude exception are reported as IOExceptions.