Interface for resolving entities
Interface for resolving entities.The EntityResolver interface is implemented by clients to provide customizable handling of entity resolution during XML parsing. An implementation of this interface should be registered with the parser using the setEntityResolver() method of the parser object. The parser will then allow the application to intercept any external entities (both resolution of external DTD subsets and all external parameter entities except the top-level document entity itself) before including them.
When a conforming parser encounters an unresolved entity reference in the XML document, it will invoke the EntityResolver to obtain an InputSource containing the resolved entity.
The class HandlerBase implements the default behaviour, which is to return null to request that the parser use the default system identifier.
The parser will invoke this method to resolve an external entity it has encountered in the XML document.
The client may signal an error by throwing an SAXException, the parser will either stop or continue parsing after the exception.
An IOException occurring while trying to resolve the external entity shall be treated as a fatal error by validating parsers, while non-validating parsers may either ignore the exception or signal it to the invoker of the parser through the error() method of the ErrorHandler class.
Alphabetic index Hierarchy of classes