The EntityResolver Interface
By passing an instance of the EntityResolver
interface to the setEntityResolver( )
method of XMLReader
, you can intercept parser
requests for external entities, such as the external DTD subset or
external parameter entities, and redirect those requests in order
to substitute different entities. For example, you could replace a
reference to a remote copy of a standard DTD with a local one or
find the sources for particular public IDs in a catalog.
package org.xml.sax; public interfaceEntityResolver
{ public InputSourceresolveEntity
(StringpublicID
, StringsystemID
) throws SAXException, IOException; }