com.day.cq.rewriter.xml.helpers
Class SAXRecorder

java.lang.Object
  extended by com.day.cq.rewriter.xml.helpers.NOPRecorder
      extended by com.day.cq.rewriter.xml.helpers.SAXRecorder
All Implemented Interfaces:
ContentHandler, LexicalHandler

public final class SAXRecorder
extends NOPRecorder

This class records all character and element SAX events and creates a string from them.


Constructor Summary
SAXRecorder()
           
 
Method Summary
 void characters(char[] ary, int start, int length)
           
 void endElement(String namespace, String name, String raw)
           
 String getText()
           
 void startElement(String namespace, String name, String raw, Attributes attr)
           
 
Methods inherited from class com.day.cq.rewriter.xml.helpers.NOPRecorder
comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXRecorder

public SAXRecorder()
Method Detail

characters

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

endElement

public void endElement(String namespace,
                       String name,
                       String raw)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class NOPRecorder
Throws:
SAXException

startElement

public void startElement(String namespace,
                         String name,
                         String raw,
                         Attributes attr)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class NOPRecorder
Throws:
SAXException

getText

public String getText()
Returns:
Recorded text so far, trimmed.


Copyright © 2008 Day Management AG. All Rights Reserved.