Name
The EntityResolver Interface
Synopsis
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; }
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.