com.openharbor.beck.sax
Class SAXWriter

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bycom.openharbor.beck.sax.SAXWriter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SAXWriter
extends org.xml.sax.helpers.DefaultHandler

Converts from SAX2 to an XMLWriter. Ignores whitespace immediately following a tag (startElement or endElement).


Field Summary
protected  org.apache.commons.logging.Log log
           
protected  boolean trimming
           
protected  XMLWriter writer
           
 
Constructor Summary
SAXWriter(XMLWriter writer)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void error(org.xml.sax.SAXParseException ex)
           
 void fatalError(org.xml.sax.SAXParseException ex)
           
protected  void printError(java.lang.String type, org.xml.sax.SAXParseException ex)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String raw, org.xml.sax.Attributes attrs)
           
 void warning(org.xml.sax.SAXParseException ex)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected XMLWriter writer

trimming

protected boolean trimming

log

protected final org.apache.commons.logging.Log log
Constructor Detail

SAXWriter

public SAXWriter(XMLWriter writer)
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String raw,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

characters

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

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException ex)
             throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException ex)
           throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

printError

protected void printError(java.lang.String type,
                          org.xml.sax.SAXParseException ex)