net.sf.saxon.dom

Class DOMWriter

public class DOMWriter extends Object implements Receiver

DOMWriter is a Receiver that attaches the result tree to a specified Node in a DOM Document
Method Summary
voidattribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
voidcharacters(CharSequence chars, int locationId, int properties)
Character data.
voidclose()
End of the document.
voidcomment(CharSequence chars, int locationId, int properties)
Handle a comment.
voidendDocument()
Notify the end of a document node
voidendElement()
End of an element.
PipelineConfigurationgetPipelineConfiguration()
Get the pipeline configuration used for this document
StringgetSystemId()
Get the system identifier that was set with setSystemId.
voidnamespace(int namespaceCode, int properties)
voidopen()
Start of the document.
voidprocessingInstruction(String target, CharSequence data, int locationId, int properties)
Handle a processing instruction.
voidsetNextSibling(Node nextSibling)
Set next sibling
voidsetNode(Node node)
Set the attachment point for the new subtree
voidsetPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration
voidsetSystemId(String systemId)
Set the System ID of the destination tree
voidsetUnparsedEntity(String name, String systemID, String publicID)
Notify an unparsed entity URI.
voidstartContent()
voidstartDocument(int properties)
Start of a document node.
voidstartElement(int nameCode, int typeCode, int locationId, int properties)
Start of an element.
booleanusesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations supplied on element and attribute events

Method Detail

attribute

public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)

characters

public void characters(CharSequence chars, int locationId, int properties)
Character data.

close

public void close()
End of the document.

comment

public void comment(CharSequence chars, int locationId, int properties)
Handle a comment.

endDocument

public void endDocument()
Notify the end of a document node

endElement

public void endElement()
End of an element.

getPipelineConfiguration

public PipelineConfiguration getPipelineConfiguration()
Get the pipeline configuration used for this document

getSystemId

public String getSystemId()
Get the system identifier that was set with setSystemId.

Returns: The system identifier that was set with setSystemId, or null if setSystemId was not called.

namespace

public void namespace(int namespaceCode, int properties)

open

public void open()
Start of the document.

processingInstruction

public void processingInstruction(String target, CharSequence data, int locationId, int properties)
Handle a processing instruction.

setNextSibling

public void setNextSibling(Node nextSibling)
Set next sibling

Parameters: nextSibling the node, which must be a child of the attachment point, before which the new subtree will be created. If this is null the new subtree will be added after any existing children of the attachment point.

setNode

public void setNode(Node node)
Set the attachment point for the new subtree

Parameters: node the node to which the new subtree will be attached

setPipelineConfiguration

public void setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration

setSystemId

public void setSystemId(String systemId)
Set the System ID of the destination tree

setUnparsedEntity

public void setUnparsedEntity(String name, String systemID, String publicID)
Notify an unparsed entity URI.

Parameters: name The name of the unparsed entity systemID The system identifier of the unparsed entity publicID The public identifier of the unparsed entity

startContent

public void startContent()

startDocument

public void startDocument(int properties)
Start of a document node.

startElement

public void startElement(int nameCode, int typeCode, int locationId, int properties)
Start of an element.

usesTypeAnnotations

public boolean usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations supplied on element and attribute events

Returns: true if the Receiver makes any use of this information. If false, the caller may supply untyped nodes instead of supplying the type annotation