Package net.sf.basedb.util
Class XmlUtil2.Validator
- java.lang.Object
-
- net.sf.basedb.util.XmlUtil2.Validator
-
- All Implemented Interfaces:
EntityResolver
,ErrorHandler
- Enclosing class:
- XmlUtil2
private static class XmlUtil2.Validator extends Object implements ErrorHandler, EntityResolver
This class is used to handle callbacks from the XML parser. We need this for throwing better error messages and to find the DTD.
-
-
Field Summary
Fields Modifier and Type Field Description private URL
dtdFile
private String
parsedFile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException exception)
Errors thrown with a detailed error message.void
fatalError(SAXParseException exception)
Fatal errors thrown with a detailed error message.InputSource
resolveEntity(String publicId, String systemId)
This method is called when the parser wants a reference to the DTD file.void
warning(SAXParseException exception)
Ignore warnings
-
-
-
Method Detail
-
error
public void error(SAXParseException exception) throws SAXException
Errors thrown with a detailed error message.- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
Fatal errors thrown with a detailed error message.- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
warning
public void warning(SAXParseException exception) throws SAXException
Ignore warnings- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
This method is called when the parser wants a reference to the DTD file. If the DTD cannot be loaded null is returned.- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
-