dk.brics.xact.operations
Class ParseHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.xml.sax.ext.DefaultHandler2
          extended by dk.brics.xact.operations.ParseHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, EntityResolver2, LexicalHandler

public class ParseHandler
extends DefaultHandler2

A SAX parser that given a stream SAX events generates an XACT document


Constructor Summary
ParseHandler(Origin base)
          Constructs a new parse handler.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void comment(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String uri, String localname, String name)
           
 XML getRoot()
          Returns the resulting XML template.
 void processingInstruction(String target, String data)
           
 void setDocumentLocator(Locator locator)
           
 void startDocument()
           
 void startElement(String uri, String localname, String name, Attributes attrs)
           
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, skippedEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseHandler

public ParseHandler(Origin base)
Constructs a new parse handler.

Method Detail

characters

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

comment

public void comment(char[] ch,
                    int start,
                    int length)
Specified by:
comment in interface LexicalHandler
Overrides:
comment in class DefaultHandler2

endDocument

public void endDocument()
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler

endElement

public void endElement(String uri,
                       String localname,
                       String name)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler

getRoot

public XML getRoot()
Returns the resulting XML template.


processingInstruction

public void processingInstruction(String target,
                                  String data)
Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class DefaultHandler

setDocumentLocator

public void setDocumentLocator(Locator locator)
Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class DefaultHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler

startElement

public void startElement(String uri,
                         String localname,
                         String name,
                         Attributes attrs)
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler
Throws:
SAXException


Copyright © 2005-2011 Aarhus University.