net.jangaroo.exml.xml
Class PreserveLineNumberHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by net.jangaroo.exml.xml.PreserveLineNumberHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

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

SAX Handler that fills a DOM document with the XML nodes and ads line numbers to the element user data


Field Summary
static String LINE_NUMBER_KEY_NAME
           
 
Constructor Summary
PreserveLineNumberHandler(Document doc)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String localName, String qName)
           
 void setDocumentLocator(Locator locator)
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_NUMBER_KEY_NAME

public static final String LINE_NUMBER_KEY_NAME
See Also:
Constant Field Values
Constructor Detail

PreserveLineNumberHandler

public PreserveLineNumberHandler(Document doc)
Method Detail

setDocumentLocator

public void setDocumentLocator(Locator locator)
Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

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


Copyright © 2002-2012 CoreMedia AG. All Rights Reserved.