public abstract class AbstractLoader
extends org.xml.sax.helpers.DefaultHandler
The error handling policy can be described as being austere, dead set, disciplinary, dour, draconian, exacting, firm, forbidding, grim, hard, hard- boiled, harsh, harsh, in line, iron-fisted, no-nonsense, oppressive, persnickety, picky, prudish, punctilious, puritanical, rigid, rigorous, scrupulous, set, severe, square, stern, stickler, straight, strait-laced, stringent, stuffy, stuffy, tough, unpermissive, unsparing and uptight.
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
EXTERNAL_GENERAL_ENTITIES
Feature that enables including external general entities in XML files.
|
private static java.lang.String |
LOAD_EXTERNAL_DTD
Feature that enables loading external DTD when loading XML files.
|
private org.xml.sax.XMLReader |
parser
Parser to read XML files.
|
private java.util.Map<java.lang.String,java.lang.String> |
publicIdToResourceNameMap
Maps public id to resolve to resource name for the DTD.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLoader(java.util.Map<java.lang.String,java.lang.String> publicIdToResourceNameMap)
Creates a new instance.
|
protected |
AbstractLoader(java.lang.String publicId,
java.lang.String dtdResourceName)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
error(org.xml.sax.SAXParseException exception) |
void |
fatalError(org.xml.sax.SAXParseException exception) |
void |
parseInputSource(org.xml.sax.InputSource inputSource)
Parses the specified input source.
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId) |
private static final java.lang.String LOAD_EXTERNAL_DTD
private static final java.lang.String EXTERNAL_GENERAL_ENTITIES
private final java.util.Map<java.lang.String,java.lang.String> publicIdToResourceNameMap
private final org.xml.sax.XMLReader parser
protected AbstractLoader(java.lang.String publicId,
java.lang.String dtdResourceName)
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
publicId - the public ID for the DTD to resolvedtdResourceName - the resource for the DTDorg.xml.sax.SAXException - if an error occursjavax.xml.parsers.ParserConfigurationException - if an error occursprotected AbstractLoader(java.util.Map<java.lang.String,java.lang.String> publicIdToResourceNameMap)
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
publicIdToResourceNameMap - maps public IDs to DTD resource namesorg.xml.sax.SAXException - if an error occursjavax.xml.parsers.ParserConfigurationException - if an error occurspublic void parseInputSource(org.xml.sax.InputSource inputSource)
throws java.io.IOException,
org.xml.sax.SAXException
inputSource - the input source to parse.java.io.IOException - if an error occursorg.xml.sax.SAXException - in an error occurspublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException,
java.io.IOException
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException