public class XMLEntityResolver extends java.lang.Object implements IXMLEntityResolver
Constructor and Description |
---|
XMLEntityResolver()
Initializes the resolver.
|
Modifier and Type | Method and Description |
---|---|
void |
addExternalEntity(java.lang.String name,
java.lang.String publicID,
java.lang.String systemID)
Adds an external entity.
|
void |
addInternalEntity(java.lang.String name,
java.lang.String value)
Adds an internal entity.
|
protected void |
finalize()
Cleans up the object when it's destroyed.
|
java.io.Reader |
getEntity(IXMLReader xmlReader,
java.lang.String name)
Returns a Java reader containing the value of an entity.
|
boolean |
isExternalEntity(java.lang.String name)
Returns true if an entity is external.
|
protected java.io.Reader |
openExternalEntity(IXMLReader xmlReader,
java.lang.String publicID,
java.lang.String systemID)
Opens an external entity.
|
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void addInternalEntity(java.lang.String name, java.lang.String value)
addInternalEntity
in interface IXMLEntityResolver
name
- the name of the entity.value
- the value of the entity.public void addExternalEntity(java.lang.String name, java.lang.String publicID, java.lang.String systemID)
addExternalEntity
in interface IXMLEntityResolver
name
- the name of the entity.publicID
- the public ID of the entity, which may be null.systemID
- the system ID of the entity.public java.io.Reader getEntity(IXMLReader xmlReader, java.lang.String name) throws XMLParseException
getEntity
in interface IXMLEntityResolver
xmlReader
- the current XML readername
- the name of the entity.XMLParseException
- If an exception occurred while resolving the entity.public boolean isExternalEntity(java.lang.String name)
isExternalEntity
in interface IXMLEntityResolver
name
- the name of the entity.protected java.io.Reader openExternalEntity(IXMLReader xmlReader, java.lang.String publicID, java.lang.String systemID) throws XMLParseException
xmlReader
- the current XML readerpublicID
- the public ID, which may be nullsystemID
- the system IDXMLParseException