|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas_ejb.deployment.api.SAXParserHelper
This class provides support for complete XML parsing support including DTD location resolution and XML parsing errors. It allows parsing XML files with are without DOCTYPE and with DTDs that can be found from the classpath.
Constructor Summary | |
SAXParserHelper()
constructor using the default ErrorHandler and EntityResolver |
|
SAXParserHelper(org.xml.sax.ErrorHandler errorHandler,
org.xml.sax.EntityResolver entityResolver)
constructor for use of external ErrorHandler and EntityResolver. |
Method Summary | |
void |
error(org.xml.sax.SAXParseException e)
If a DTD has been found, this will delegate error callbacks to the errorHandler or rethrow them. |
void |
fatalError(org.xml.sax.SAXParseException e)
Delegate fatalerror callbacks to the errorHandler or rethrow them. |
org.xml.sax.SAXParseException |
getSAXParseException()
Retreive the previously thrown SAXParseException. |
java.lang.String |
getStandardDTDVersion()
|
org.xml.sax.EntityResolver |
getWrappedEntityResolver()
Return a wrapped EntityResolver for use by the parser. |
org.xml.sax.ErrorHandler |
getWrappedErrorHandler()
Return a wrapped ErrorHandler for use by the parser. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicID,
java.lang.String systemID)
Method used by the parser to read the DTD specified in DOCTYPE. |
void |
setDTDVersion(java.lang.String sysid)
|
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
set the EntityResolver to be used by the helper |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
set the ErrorHandler to be used by the helper |
void |
warning(org.xml.sax.SAXParseException e)
Delegate warning callbacks to the errorHandler or ingnore them. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXParserHelper(org.xml.sax.ErrorHandler errorHandler, org.xml.sax.EntityResolver entityResolver)
resolveEntityCalled
- Parameters:
errorHandler
- the Errorhandler to delegate toentityResolver
- the EntityResolver to delegate to
public SAXParserHelper()
Method Detail |
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
public org.xml.sax.ErrorHandler getWrappedErrorHandler()
public org.xml.sax.EntityResolver getWrappedEntityResolver()
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
e
- the SAXParseException
that caused the warning.public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
e
- the SAXParseException
that caused the error.public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
e
- the SAXParseException
that caused the fatal error.public org.xml.sax.SAXParseException getSAXParseException()
public org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String systemID) throws java.io.IOException, org.xml.sax.SAXException
entityResolver
if set. Otherwise,
the default behaviour is as follow:
The filename
of the systemID parameter (which matches
to the filename of the PUBLIC url or SYSTEM path) is used as
a name for loading the DTD as a classloader resource.
resolveEntity
in interface org.xml.sax.EntityResolver
publicID
- the name of DOCTYPE SYSTEMsystemID
- the url of DOCTYPE PUBLIC or path of DOCTYPE SYSTEMpublic void setDTDVersion(java.lang.String sysid)
public java.lang.String getStandardDTDVersion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |