textbender.g.xml.dom
Class DOMErrorHandlerPW

java.lang.Object
  extended by DOMErrorHandlerPW
All Implemented Interfaces:
DOMErrorHandler

public class DOMErrorHandlerPW
extends Object
implements DOMErrorHandler

A DOM error handler that outputs messages to a print writer.


Constructor Summary
DOMErrorHandlerPW(PrintWriter w)
          Creates a DOMErrorHandlerPW.
 
Method Summary
 int count()
          Returns the sum of error, fatal error and warning counts.
 int getErrorCount()
          Returns the error count.
 int getFatalErrorCount()
          Returns the fatal error count.
 int getWarningCount()
          Returns the warning count.
 boolean handleError(DOMError e)
          Outputs an error through the print writer.
protected  void output(String severityName, DOMError e)
           
 void reset()
          Resets all counts to zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMErrorHandlerPW

public DOMErrorHandlerPW(PrintWriter w)
Creates a DOMErrorHandlerPW. If using it repeatedly, call reset() between parses.

Method Detail

count

public int count()
Returns the sum of error, fatal error and warning counts.


getErrorCount

public int getErrorCount()
Returns the error count.


getFatalErrorCount

public int getFatalErrorCount()
Returns the fatal error count.


getWarningCount

public int getWarningCount()
Returns the warning count.


reset

public void reset()
Resets all counts to zero.


handleError

public boolean handleError(DOMError e)
Outputs an error through the print writer. Increments the count.

Specified by:
handleError in interface DOMErrorHandler

output

protected void output(String severityName,
                      DOMError e)