public class DOMSender
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.w3c.dom.Node |
root |
protected java.lang.String |
systemId |
Constructor and Description |
---|
DOMSender(org.w3c.dom.Node startNode,
Receiver receiver)
Create a DOMSender that will send events representing the nodes in a tree
to a nominated receiver
|
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Node |
getCurrentNode()
While an event is being processed by the receiver, the DOM Node to which it relates
is available as the value of currentNode
|
void |
send()
Walk a tree (traversing the nodes depth first).
|
void |
setSystemId(java.lang.String systemId)
Set the systemId of the source document (which will also be
used for the destination)
|
public DOMSender(org.w3c.dom.Node startNode, Receiver receiver)
startNode
- the root node of the tree to be send. Usually a document or element node.receiver
- the object to be notified of the resulting events. The supplied Receiver must
be initialized with a PipelineConfiguration. The caller is responsible for opening
and closing the Receiver.public void setSystemId(java.lang.String systemId)
systemId
- the systemId of the source documentpublic void send() throws XPathException
java.lang.IllegalStateException
- if the
start node is of a node kind other than document, document fragment, element, text,
comment, or processing instruction (for example, if it is an attribute node).XPathException
- On any error in the documentpublic org.w3c.dom.Node getCurrentNode()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.