org.exolab.castor.xml
Class DebugHandler

java.lang.Object
  extended byorg.exolab.castor.xml.DebugHandler
All Implemented Interfaces:
org.xml.sax.DocumentHandler

public class DebugHandler
extends java.lang.Object
implements org.xml.sax.DocumentHandler

A Simple DocumentHandler that intercepts SAX events and prints them to the console

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:09 $
Author:
Keith Visco

Constructor Summary
DebugHandler(org.xml.sax.DocumentHandler handler)
          Creates a new DebugHandler which forwards events to the given document handler
DebugHandler(org.xml.sax.DocumentHandler handler, java.io.Writer out)
          Creates a new DebugHandler which forwards events to the given document handler
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(java.lang.String name)
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void startDocument()
           
 void startElement(java.lang.String name, org.xml.sax.AttributeList atts)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugHandler

public DebugHandler(org.xml.sax.DocumentHandler handler)
Creates a new DebugHandler which forwards events to the given document handler

Parameters:
handler - the DocumentHandler to forward events to

DebugHandler

public DebugHandler(org.xml.sax.DocumentHandler handler,
                    java.io.Writer out)
Creates a new DebugHandler which forwards events to the given document handler

Parameters:
handler - the DocumentHandler to forward events to
out - the Writer to print debug information to
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Specified by:
ignorableWhitespace in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Specified by:
processingInstruction in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.DocumentHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com