This project has retired. For details please refer to its
Attic page .
TextSerializer (Apache Cocoon 3: Parent 3.0.0-beta-1-SNAPSHOT API)
org.apache.cocoon.sax.component
Class TextSerializer
java.lang.Object
org.apache.cocoon.xml.sax.AbstractSAXProducer
org.apache.cocoon.xml.sax.AbstractSAXPipe
org.apache.cocoon.sax.util.SAXConsumerAdapter
org.apache.cocoon.sax.AbstractSAXSerializer
org.apache.cocoon.sax.component.XMLSerializer
org.apache.cocoon.sax.component.TextSerializer
All Implemented Interfaces: CachingPipelineComponent , Consumer , Finisher , PipelineComponent , SAXConsumer , SAXPipelineComponent , ContentHandler , LexicalHandler
public class TextSerializer extends XMLSerializer
Converts XML into plain text. It omits all XML tags and writes only character
events to the output. Input document must have at least one element - root
element - which should wrap all the text inside it.
Fields inherited from class org.apache.cocoon.xml.sax.AbstractSAXProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler
Method Summary
void
characters (char[] c,
int start,
int len)
static TextSerializer
createPlainSerializer ()
void
endDocument ()
void
endDTD ()
void
endElement (String uri,
String name,
String raw)
void
processingInstruction (String target,
String data)
void
recycle ()
void
setDocumentLocator (Locator locator)
void
startDTD (String name,
String publicId,
String systemId)
void
startElement (String uri,
String loc,
String raw,
Attributes a)
Methods inherited from class org.apache.cocoon.sax.component.XMLSerializer
constructCacheKey , createHTML4Serializer , createXHTMLSerializer , createXMLSerializer , getFormat , setCDataSectionElements , setDoctypePublic , setDoctypeSystem , setEncoding , setFormat , setIndent , setMediaType , setMethod , setOmitXmlDeclaration , setOutputStream , setStandAlone , setup , setVersion
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXPipe
comment, endCDATA, endEntity, endPrefixMapping, ignorableWhitespace, skippedEntity, startCDATA, startDocument, startEntity, startPrefixMapping
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXProducer
setContentHandler
TextSerializer
public TextSerializer ()
setDocumentLocator
public void setDocumentLocator (Locator locator)
Specified by: setDocumentLocator in interface ContentHandler Overrides: setDocumentLocator in class org.apache.cocoon.xml.sax.AbstractSAXPipe
processingInstruction
public void processingInstruction (String target,
String data)
throws SAXException
Specified by: processingInstruction in interface ContentHandler Overrides: processingInstruction in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
startDTD
public void startDTD (String name,
String publicId,
String systemId)
throws SAXException
Specified by: startDTD in interface LexicalHandler Overrides: startDTD in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
endDTD
public void endDTD ()
throws SAXException
Specified by: endDTD in interface LexicalHandler Overrides: endDTD in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
startElement
public void startElement (String uri,
String loc,
String raw,
Attributes a)
throws SAXException
Specified by: startElement in interface ContentHandler Overrides: startElement in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
endElement
public void endElement (String uri,
String name,
String raw)
throws SAXException
Specified by: endElement in interface ContentHandler Overrides: endElement in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
endDocument
public void endDocument ()
throws SAXException
Specified by: endDocument in interface ContentHandler Overrides: endDocument in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
characters
public void characters (char[] c,
int start,
int len)
throws SAXException
Specified by: characters in interface ContentHandler Overrides: characters in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException - if text is encountered before root element.
recycle
public void recycle ()
Overrides: recycle in class org.apache.cocoon.xml.sax.AbstractSAXProducer
createPlainSerializer
public static TextSerializer createPlainSerializer ()
Copyright © 2008-2012 The Apache Software Foundation . All Rights Reserved.