Package com.icl.saxon.output
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 com.icl.saxon.output.Emitter
locator, namePool, outputProperties, outputStream, systemId, writer
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Produce output using the current Writer.void
comment
(char[] ch, int start, int length) Output a comment.void
End of the document.void
endElement
(int nameCode) Output an element end tag.void
processingInstruction
(String name, String value) Output a processing instruction.void
Start of the document.void
startElement
(int nameCode, Attributes attributes, int[] namespaces, int nscount) Output an element start tag.Methods inherited from class com.icl.saxon.output.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:
startDocument
in classEmitter
- Throws:
TransformerException
-
endDocument
End of the document.- Specified by:
endDocument
in classEmitter
- Throws:
TransformerException
-
characters
Produce output using the current Writer.
Special characters are not escaped.- Specified by:
characters
in 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:
startElement
in 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:
endElement
in classEmitter
- Parameters:
name
- The element name (tag)- Throws:
TransformerException
-
processingInstruction
Output a processing instruction.
Does nothing with this output method.- Specified by:
processingInstruction
in classEmitter
- Throws:
TransformerException
-
comment
Output a comment.
Does nothing with this output method.- Specified by:
comment
in classEmitter
- Throws:
TransformerException
-