|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.io.XMLValidatorLazyErrorHandler
public class XMLValidatorLazyErrorHandler
This class handles errors when validating an XML file against an XSD (XML Schema Definition) file. This error handler does not print any error messages, but only propagates all non-warning exceptions further (that's why it is called "lazy"). Intended to be used in connection with methods that want to handle validation errors themselves, e.g. where one wants a simple true/false response on whether an XML file is valid. Based on MyErrorHandler.java by Neeraj Bajaj, Sun Microsystems, in example code described here.
| Constructor Summary | |
|---|---|
XMLValidatorLazyErrorHandler()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
error(SAXParseException sAXParseException)
Handles validation non-fatal errors. |
void |
fatalError(SAXParseException sAXParseException)
Handles validation fatal errors. |
void |
warning(SAXParseException sAXParseException)
Handles validation warnings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLValidatorLazyErrorHandler()
| Method Detail |
|---|
public void error(SAXParseException sAXParseException)
throws SAXException
error in interface ErrorHandlersAXParseException - An org.xml.sax.SAXParseException exception.
SAXException
public void fatalError(SAXParseException sAXParseException)
throws SAXException
fatalError in interface ErrorHandlersAXParseException - An org.xml.sax.SAXParseException exception.
SAXExceptionpublic void warning(SAXParseException sAXParseException)
warning in interface ErrorHandlersAXParseException - An org.xml.sax.SAXParseException exception.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||