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 NodeLocation s 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
NodeLocation s 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)
NodeLocation
s 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 NodeLocation
s during
the loading of XML documents.
This facility is needed to implement XXE's Check Assembly.
setAddingElementPointer(boolean)
public void setConsole(Console c)
Loader
setConsole
in interface Loader
c
- the console; may be null
, in which case messages
are displayed on System.err
and System.out
Loader.getConsole()
public ConsoleHelper getConsole()
Loader
getConsole
in interface Loader
Loader.setConsole(com.xmlmind.util.Console)
public void setEntityResolver(EntityResolver resolver)
Loader
setEntityResolver
in interface Loader
resolver
- which resolver to use. May be null
.Loader.getEntityResolver()
public EntityResolver getEntityResolver()
Loader
null
.getEntityResolver
in interface Loader
Loader.setEntityResolver(org.xml.sax.EntityResolver)
public Document load(File file) throws IOException
IOException
public Document load(URL url) throws IOException
IOException
public Document load(InputStream in, URL url) throws IOException
Loader
Note: xi:include
elements (XInclude)
are expected to have been processed in the loaded document.
load
in interface Loader
in
- 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 IOException
s.public static XMLReader createXMLReader(boolean xincludeAware)
public static final String format(SAXParseException e)