public class FSEntityResolver extends Object implements EntityResolver2
A SAX EntityResolver for common entity references and DTDs in X/HTML processing. Maps official entity references to local copies to avoid network lookup. The local copies are stored in the source tree under /entities, and the references here are resolved by a system ClassLoader. As long as the entity files are in the classpath (or bundled in the FS jar), they will be picked up.
The basic form of this class comes from Elliot Rusty Harold, on http://www.cafeconleche.org/books/xmljava/chapters/ch07s02.html
This class is a Singleton; use instance to retrieve it.
| Modifier and Type | Method and Description |
|---|---|
Map |
getEntities()
Returns a map of entities parsed by this resolver.
|
InputSource |
getExternalSubset(String name,
String baseURI) |
static FSEntityResolver |
instance()
Gets an instance of this class.
|
InputSource |
resolveEntity(String publicID,
String systemID)
Description of the Method
|
InputSource |
resolveEntity(String name,
String publicId,
String baseURI,
String systemId) |
public InputSource resolveEntity(String publicID, String systemID) throws SAXException
resolveEntity in interface EntityResolverpublicID - PARAMsystemID - PARAMSAXException - Throwspublic InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
resolveEntity in interface EntityResolver2SAXExceptionIOExceptionpublic InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException
getExternalSubset in interface EntityResolver2SAXExceptionIOExceptionpublic static FSEntityResolver instance()
public Map getEntities()
Copyright © 2017. All rights reserved.