com.xmlmind.domutil
Interface Loader

All Known Implementing Classes:
LoaderImpl, XLoader

public interface Loader

A W3C DOM document loader service.


Method Summary
 Console getConsole()
          Returns the console on which messages issued during document loading are to be displayed.
 org.xml.sax.EntityResolver getEntityResolver()
          Returns the entity resolver being used when loading an XML document.
 org.w3c.dom.Document load(java.io.InputStream in, java.net.URL url)
          Load document from specified input stream.
 void setConsole(Console c)
          Specifies the console on which messages issued during document loading are to be displayed.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          Specifies which entity resolver to use when loading an XML document.
 

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()

getConsole

Console getConsole()
Returns the console on which messages issued during document loading are to be displayed.

See Also:
setConsole(com.xmlmind.util.Console)

setEntityResolver

void setEntityResolver(org.xml.sax.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()

getEntityResolver

org.xml.sax.EntityResolver getEntityResolver()
Returns the entity resolver being used when loading an XML document. May return null.

See Also:
setEntityResolver(org.xml.sax.EntityResolver)

load

org.w3c.dom.Document load(java.io.InputStream in,
                          java.net.URL url)
                          throws java.io.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:
java.io.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.