flattree.xml.sax
Class FlatHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by flattree.xml.sax.FlatHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class FlatHandler
extends DefaultHandler

A ContentHandler writing flat files.


Constructor Summary
FlatHandler(Node root, Writer writer)
          Write contents to the given writer.
FlatHandler(TreeWriter writer)
          Write contents to the given writer.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String localName, String qName)
           
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatHandler

public FlatHandler(Node root,
                   Writer writer)
Write contents to the given writer.

Parameters:
root - root defining the flat structure
writer - writer to write to

FlatHandler

public FlatHandler(TreeWriter writer)
Write contents to the given writer.

Parameters:
writer - writer to write to
Method Detail

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException


Copyright © 2011. All Rights Reserved.