Class XMLErrorHandler
java.lang.Object
org.dom4j.util.XMLErrorHandler
- All Implemented Interfaces:
ErrorHandler
XMLErrorHandler
is a SAX ErrorHandler
which turns the
SAX parsing errors into XML so that the output can be formatted using XSLT or
the errors can be included in a SOAP message.- Version:
- $Revision: 1.7 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final QName
private QName
QName used for error elementsprivate Element
Stores the errors that occur during a SAX parseprotected static final QName
private QName
QName used for fatalerror elementsprotected static final QName
private QName
QName used for warning elements -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addException
(Element element, SAXParseException e) Adds the given parse exception information to the given element instancevoid
void
void
setErrorQName
(QName errorQName) void
void
setFatalErrorQName
(QName fatalErrorQName) void
setWarningQName
(QName warningQName) void
-
Field Details
-
ERROR_QNAME
-
FATALERROR_QNAME
-
WARNING_QNAME
-
errors
Stores the errors that occur during a SAX parse -
errorQName
QName used for error elements -
fatalErrorQName
QName used for fatalerror elements -
warningQName
QName used for warning elements
-
-
Constructor Details
-
XMLErrorHandler
public XMLErrorHandler() -
XMLErrorHandler
-
-
Method Details
-
error
- Specified by:
error
in interfaceErrorHandler
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
-
warning
- Specified by:
warning
in interfaceErrorHandler
-
getErrors
-
setErrors
-
getErrorQName
-
setErrorQName
-
getFatalErrorQName
-
setFatalErrorQName
-
getWarningQName
-
setWarningQName
-
addException
Adds the given parse exception information to the given element instance- Parameters:
element
- DOCUMENT ME!e
- DOCUMENT ME!
-