XMLErrorHandler (dom4j 1.6.1 API)

dom4j


org.dom4j.util Class XMLErrorHandler

java.lang.Object
  extended byorg.dom4j.util.XMLErrorHandler
All Implemented Interfaces:
ErrorHandler

public class XMLErrorHandler
extends Object
implements ErrorHandler

XMLErrorHandler is a SAX ErrorHandlerwhich 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 $
Author:
James Strachan

Field Summary
protected static QName ERROR_QNAME
           
protected static QName FATALERROR_QNAME
           
protected static QName WARNING_QNAME
           
 
Constructor Summary
XMLErrorHandler()
           
XMLErrorHandler(Element errors)
           
 
Method Summary
protected  void addException(Element element, SAXParseException e)
          Adds the given parse exception information to the given element instance
 void error(SAXParseException e)
           
 void fatalError(SAXParseException e)
           
 QName getErrorQName()
           
 Element getErrors()
           
 QName getFatalErrorQName()
           
 QName getWarningQName()
           
 void setErrorQName(QName errorQName)
           
 void setErrors(Element errors)
           
 void setFatalErrorQName(QName fatalErrorQName)
           
 void setWarningQName(QName warningQName)
           
 void warning(SAXParseException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_QNAME

protected static final QName ERROR_QNAME

FATALERROR_QNAME

protected static final QName FATALERROR_QNAME

WARNING_QNAME

protected static final QName WARNING_QNAME
Constructor Detail

XMLErrorHandler

public XMLErrorHandler()

XMLErrorHandler

public XMLErrorHandler(Element errors)
Method Detail

error

public void error(SAXParseException e)
Specified by:
error in interface ErrorHandler

fatalError

public void fatalError(SAXParseException e)
Specified by:
fatalError in interface ErrorHandler

warning

public void warning(SAXParseException e)
Specified by:
warning in interface ErrorHandler

getErrors

public Element getErrors()

setErrors

public void setErrors(Element errors)

getErrorQName

public QName getErrorQName()

setErrorQName

public void setErrorQName(QName errorQName)

getFatalErrorQName

public QName getFatalErrorQName()

setFatalErrorQName

public void setFatalErrorQName(QName fatalErrorQName)

getWarningQName

public QName getWarningQName()

setWarningQName

public void setWarningQName(QName warningQName)

addException

protected void addException(Element element,
                            SAXParseException e)
Adds the given parse exception information to the given element instance

Parameters:
element - DOCUMENT ME!
e - DOCUMENT ME!


Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.