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
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
error
(SAXParseException exception) Errors thrown with a detailed error message.void
fatalError
(SAXParseException exception) Fatal errors thrown with a detailed error message.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
-
Field Details
-
parsedFile
-
dtdFile
-
-
Constructor Details
-
Validator
Create a new instance of this class.
-
-
Method Details
-
error
Errors thrown with a detailed error message.- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
Fatal errors thrown with a detailed error message.- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
warning
Ignore warnings- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
resolveEntity
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
-