net.sf.saxon.dom

Class DOMWriter

Implemented Interfaces:
Receiver, Result

public class DOMWriter
extends java.lang.Object
implements Receiver

DOMWriter is a Receiver that attaches the result tree to a specified Node in a DOM Document

Method Summary

void
attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
void
characters(CharSequence chars, int locationId, int properties)
Character data.
void
close()
End of the document.
void
comment(CharSequence chars, int locationId, int properties)
Handle a comment.
void
endDocument()
Notify the end of a document node
void
endElement()
End of an element.
PipelineConfiguration
getPipelineConfiguration()
Get the pipeline configuration used for this document
String
getSystemId()
Get the system identifier that was set with setSystemId.
void
namespace(int namespaceCode, int properties)
void
open()
Start of the document.
void
processingInstruction(String target, CharSequence data, int locationId, int properties)
Handle a processing instruction.
void
setNode(Node node)
Set output destination
void
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration
void
setSystemId(String systemId)
Set the System ID of the destination tree
void
setUnparsedEntity(String name, String systemID, String publicID)
Notify an unparsed entity URI.
void
startContent()
void
startDocument(int properties)
Start of a document node.
void
startElement(int nameCode, int typeCode, int locationId, int properties)
Start of an element.

Method Details

attribute

public void attribute(int nameCode,
                      int typeCode,
                      CharSequence value,
                      int locationId,
                      int properties)
            throws XPathException
Specified by:
attribute in interface Receiver

characters

public void characters(CharSequence chars,
                       int locationId,
                       int properties)
            throws XPathException
Character data.
Specified by:
characters in interface Receiver

close

public void close()
End of the document.
Specified by:
close in interface Receiver

comment

public void comment(CharSequence chars,
                    int locationId,
                    int properties)
            throws XPathException
Handle a comment.
Specified by:
comment in interface Receiver

endDocument

public void endDocument()
            throws XPathException
Notify the end of a document node
Specified by:
endDocument in interface Receiver

endElement

public void endElement()
            throws XPathException
End of an element.
Specified by:
endElement in interface Receiver

getPipelineConfiguration

public PipelineConfiguration getPipelineConfiguration()
Get the pipeline configuration used for this document
Specified by:
getPipelineConfiguration in interface Receiver

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)
            throws XPathException
Specified by:
namespace in interface Receiver

open

public void open()
Start of the document.
Specified by:
open in interface Receiver

processingInstruction

public void processingInstruction(String target,
                                  CharSequence data,
                                  int locationId,
                                  int properties)
            throws XPathException
Handle a processing instruction.
Specified by:
processingInstruction in interface Receiver

setNode

public void setNode(Node node)
Set output destination
Parameters:
node - the node to which the new subtree will be attached

setPipelineConfiguration

public void setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration
Specified by:
setPipelineConfiguration in interface Receiver

setSystemId

public void setSystemId(String systemId)
Set the System ID of the destination tree
Specified by:
setSystemId in interface Receiver

setUnparsedEntity

public void setUnparsedEntity(String name,
                              String systemID,
                              String publicID)
            throws XPathException
Notify an unparsed entity URI.
Specified by:
setUnparsedEntity in interface Receiver
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()
            throws XPathException
Specified by:
startContent in interface Receiver

startDocument

public void startDocument(int properties)
            throws XPathException
Start of a document node.
Specified by:
startDocument in interface Receiver

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
            throws XPathException
Start of an element.
Specified by:
startElement in interface Receiver