Package com.mycila.xmltool
Class XMLErrorHandler
java.lang.Object
com.mycila.xmltool.XMLErrorHandler
- All Implemented Interfaces:
ValidationResult
,ErrorListener
,ErrorHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
error
(TransformerException exception) void
error
(SAXParseException exception) void
fatalError
(TransformerException exception) void
fatalError
(SAXParseException exception) String[]
String[]
boolean
hasError()
boolean
private void
private void
logWarning
(Throwable cause) private String[]
void
warning
(TransformerException exception) void
warning
(SAXParseException exception)
-
Field Details
-
errors
-
warnings
-
throwExceptionOnError
private final boolean throwExceptionOnError
-
-
Constructor Details
-
XMLErrorHandler
XMLErrorHandler() -
XMLErrorHandler
XMLErrorHandler(boolean throwExceptionOnError)
-
-
Method Details
-
logError
-
logWarning
-
error
- Specified by:
error
in interfaceErrorListener
- Throws:
TransformerException
-
fatalError
- Specified by:
fatalError
in interfaceErrorListener
- Throws:
TransformerException
-
warning
- Specified by:
warning
in interfaceErrorListener
- Throws:
TransformerException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
getErrors
- Specified by:
getErrors
in interfaceValidationResult
-
getWarnings
- Specified by:
getWarnings
in interfaceValidationResult
-
getErrorMessages
- Specified by:
getErrorMessages
in interfaceValidationResult
-
getWarningMessages
- Specified by:
getWarningMessages
in interfaceValidationResult
-
hasError
public boolean hasError()- Specified by:
hasError
in interfaceValidationResult
-
hasWarning
public boolean hasWarning()- Specified by:
hasWarning
in interfaceValidationResult
-
messages
-