|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.calitha.xml.SimpleErrorHandler
public class SimpleErrorHandler
This class represents an error handler for XML parsers with a simple to use API.
The error handlers stores warnings, errors and fatal errors encountered by the parser.
| Constructor Summary | |
|---|---|
SimpleErrorHandler()
Creates a new error handler. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all fatal errors, errors and warnings. |
boolean |
containsError()
Determines if any errors are stored. |
boolean |
containsFatalError()
Determines if any fatal errors are stored |
boolean |
containsWarning()
Determines if any warnings are stored. |
void |
error(SAXParseException exception)
Store an exception caused by an error. |
void |
fatalError(SAXParseException exception)
Store an exception caused by a fatal error. |
SAXParseException[] |
getErrors()
Gets the errors that are stored so far. |
SAXParseException[] |
getFatalErrors()
Gets the fatal errors that are stored so far. |
SAXParseException |
getFirstProblem()
Gets the first problem, either a warning, error or fatal error, that was encountered by a parser. |
SAXParseException[] |
getWarnings()
Gets the warnings that are stored so far. |
boolean |
isValid()
Determines if no error or fatal error is stored. |
String |
toString()
Returns a string containing all stored problems. |
void |
warning(SAXParseException exception)
Store an exception caused by a warning. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleErrorHandler()
| Method Detail |
|---|
public void warning(SAXParseException exception)
throws SAXException
warning in interface ErrorHandlerexception - parse exception
SAXException
public void error(SAXParseException exception)
throws SAXException
error in interface ErrorHandlerexception - parse exception
SAXException
public void fatalError(SAXParseException exception)
throws SAXException
fatalError in interface ErrorHandlerexception - parse exception
SAXExceptionpublic SAXParseException[] getWarnings()
public SAXParseException[] getErrors()
public SAXParseException[] getFatalErrors()
public void clear()
public SAXParseException getFirstProblem()
public boolean containsWarning()
public boolean containsError()
public boolean containsFatalError()
public boolean isValid()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||