com.icl.saxon.output

Class DOMEmitter

Implemented Interfaces:
Result

public class DOMEmitter
extends Emitter

DOMEmitter is an Emitter that attaches the result tree to a specified Node in a DOM Document

Field Summary

protected Node
currentNode
protected Document
document

Fields inherited from class com.icl.saxon.output.Emitter

locator, namePool, outputProperties, outputStream, systemId, writer

Method Summary

void
characters(char[] ch, int start, int length)
Character data.
void
comment(ch[] , int start, int length)
Handle a comment.
void
endDocument()
End of the document.
void
endElement(int nameCode)
End of an element.
void
processingInstruction(String target, String data)
Handle a processing instruction.
void
setNode(Node node)
Set output destination
void
startDocument()
Start of the document.
void
startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)
Start of an element.

Methods inherited from class com.icl.saxon.output.Emitter

characters, comment, endDocument, endElement, getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, startDocument, startElement, usesWriter

Field Details

currentNode

protected Node currentNode

document

protected Document document

Method Details

characters

public void characters(char[] ch,
                       int start,
                       int length)
            throws TransformerException
Character data.
Overrides:
characters in interface Emitter

comment

public void comment(ch[] ,
                    int start,
                    int length)
            throws TransformerException
Handle a comment.

endDocument

public void endDocument()
End of the document.
Overrides:
endDocument in interface Emitter

endElement

public void endElement(int nameCode)
            throws TransformerException
End of an element.
Overrides:
endElement in interface Emitter

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws TransformerException
Handle a processing instruction.
Overrides:
processingInstruction in interface Emitter

setNode

public void setNode(Node node)
Set output destination

startDocument

public void startDocument()
Start of the document.
Overrides:
startDocument in interface Emitter

startElement

public void startElement(int nameCode,
                         Attributes attributes,
                         int[] namespaces,
                         int nscount)
            throws TransformerException
Start of an element. Output the start tag, escaping special characters.
Overrides:
startElement in interface Emitter