Class StringEmitter
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.StringEmitter
- All Implemented Interfaces:
Result
This class outputs text content to a StringBuffer, and discards all other content.
- Author:
- Michael H. Kay
-
Field Summary
Fields inherited from class Emitter
locator, namePool, outputProperties, outputStream, systemId, writerFields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Produce output using the current Writer.voidcomment(char[] ch, int start, int length) Output a comment.voidEnd of the document.voidendElement(int nameCode) Output an element end tag.voidprocessingInstruction(String name, String value) Output a processing instruction.voidStart of the document.voidstartElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) Output an element start tag.Methods inherited from class Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, usesWriter
-
Constructor Details
-
StringEmitter
-
-
Method Details
-
startDocument
Start of the document.- Specified by:
startDocumentin classEmitter- Throws:
TransformerException
-
endDocument
End of the document.- Specified by:
endDocumentin classEmitter- Throws:
TransformerException
-
characters
Produce output using the current Writer.
Special characters are not escaped.- Specified by:
charactersin classEmitter- Parameters:
ch- Character array to be outputstart- start position of characters to be outputlength- number of characters to be output- Throws:
TransformerException- for any failure
-
startElement
public void startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount) throws TransformerException Output an element start tag.
Does nothing with this output method.- Specified by:
startElementin classEmitter- Parameters:
namespaces- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnscount- Number of significant entries within namespaces arrayname- The element name (tag)- Throws:
TransformerException
-
endElement
Output an element end tag.
Does nothing with this output method.- Specified by:
endElementin classEmitter- Parameters:
name- The element name (tag)- Throws:
TransformerException
-
processingInstruction
Output a processing instruction.
Does nothing with this output method.- Specified by:
processingInstructionin classEmitter- Throws:
TransformerException
-
comment
Output a comment.
Does nothing with this output method.- Specified by:
commentin classEmitter- Throws:
TransformerException
-