org.apache.cocoon.transformation.helpers
Class TextRecorder
java.lang.Object
org.apache.cocoon.transformation.helpers.NOPRecorder
org.apache.cocoon.transformation.helpers.TextRecorder
- All Implemented Interfaces:
- XMLConsumer, ContentHandler, LexicalHandler
public final class TextRecorder
- extends NOPRecorder
This class records all character SAX events and creates a string
from them.
- Version:
- $Id: TextRecorder.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Carsten Ziegeler
Methods inherited from class org.apache.cocoon.transformation.helpers.NOPRecorder |
comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextRecorder
public TextRecorder()
characters
public void characters(char[] ary,
int start,
int length)
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class NOPRecorder
getText
public String getText()
- Returns:
- Recorded text so far, trimmed.
getAllText
public String getAllText()
- Returns:
- Recorded text so far.
NB. This is a special version of the method used by SQLTransformer
Trimming the String can damage the SQL Syntax under certain circumstances
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.