public class XMLEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
XMLEntityResolver()
Constructor for XMLEntityResolver.
|
XMLEntityResolver(java.lang.String dtdPath)
Constructor for XMLEntityResolver.
|
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findFile(java.lang.String filename,
java.lang.String path)
Searches the path for the file.
|
java.lang.String |
getSystemId()
Gets the system identifier.
|
java.lang.String |
resolveDtdName(java.lang.String systemId)
Resolves the DTD/XSD name
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
This is the method defined in EntityResolver.
|
void |
setRedirect(java.lang.String dtdPath)
Sets the DTD/XSD path.
|
void |
setSystemId(java.lang.String newSystemId)
Sets the system identifier.
|
public static final java.lang.String COPYRIGHT
public XMLEntityResolver()
public XMLEntityResolver(java.lang.String dtdPath)
dtdPath
- the path of the DTD/XSDpublic static final java.io.File findFile(java.lang.String filename, java.lang.String path)
filename
- the file namethe
- file pathpublic java.lang.String getSystemId()
public java.lang.String resolveDtdName(java.lang.String systemId)
systemId
- the system identifier of the external entity being referenced for DTD, or
the location of the xml schemapublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
publicId
- the public identifier of the external entity being referenced, or null if none was supplied.systemId
- the system identifier of the external entity being referencedorg.xml.sax.SAXException
- if the dtd or xml schema file cannot be resolved.public void setRedirect(java.lang.String dtdPath)
dtdPath
- the path of the DTD/XSDpublic void setSystemId(java.lang.String newSystemId)
newSystemId
- the system identifier of the external entity being referenced