| Constructor and Description |
|---|
LoaderImpl() |
LoaderImpl(boolean xincludeAware,
Console c) |
| Modifier and Type | Method and Description |
|---|---|
static XMLReader |
createXMLReader(boolean xincludeAware) |
static String |
format(SAXParseException e) |
ConsoleHelper |
getConsole()
Returns the console on which messages issued during document loading
are to be displayed.
|
EntityResolver |
getEntityResolver()
Returns the entity resolver being used when loading an XML document.
|
static boolean |
isAddingElementPointer()
Not part of the public, documented, API: returns
true
if element XPath pointers are added to NodeLocations during
the loading of XML documents. |
Document |
load(File file) |
Document |
load(InputStream in,
URL url)
Load document from specified input stream.
|
Document |
load(URL url) |
static void |
setAddingElementPointer(boolean add)
Not part of the public, documented, API: specifies whether
to add element XPath pointers to
NodeLocations during
the loading of XML documents. |
void |
setConsole(Console c)
Specifies the console on which messages issued during document loading
are to be displayed.
|
void |
setEntityResolver(EntityResolver resolver)
Specifies which entity resolver to use when loading an XML document.
|
public LoaderImpl()
public LoaderImpl(boolean xincludeAware,
Console c)
public static void setAddingElementPointer(boolean add)
NodeLocations during
the loading of XML documents.
This facility is needed to implement XXE's Check Assembly.
isAddingElementPointer()public static boolean isAddingElementPointer()
true
if element XPath pointers are added to NodeLocations during
the loading of XML documents.
This facility is needed to implement XXE's Check Assembly.
setAddingElementPointer(boolean)public void setConsole(Console c)
LoadersetConsole in interface Loaderc - the console; may be null, in which case messages
are displayed on System.err and System.outLoader.getConsole()public ConsoleHelper getConsole()
LoadergetConsole in interface LoaderLoader.setConsole(com.xmlmind.util.Console)public void setEntityResolver(EntityResolver resolver)
LoadersetEntityResolver in interface Loaderresolver - which resolver to use. May be null.Loader.getEntityResolver()public EntityResolver getEntityResolver()
Loadernull.getEntityResolver in interface LoaderLoader.setEntityResolver(org.xml.sax.EntityResolver)public Document load(File file) throws IOException
IOExceptionpublic Document load(URL url) throws IOException
IOExceptionpublic Document load(InputStream in, URL url) throws IOException
LoaderNote: xi:include elements (XInclude)
are expected to have been processed in the loaded document.
load in interface Loaderin - input stream allowing to load the documenturl - URL of the document to be loaded if known;
null otherwiseIOException - 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.public static XMLReader createXMLReader(boolean xincludeAware)
public static final String format(SAXParseException e)