DOMResult

public class DOMResult extends Object
implements Result

Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.

If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation, which may be retrieved with getNode().

Constant Summary

String FEATURE

If getFeature(String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

Inherited Constant Summary

Public Constructor Summary

DOMResult()

Zero-argument default constructor.

DOMResult(Node node)

Use a DOM node to create a new output target.

DOMResult(Node node, String systemId)

Use a DOM node to create a new output target with the specified System ID.

DOMResult(Node node, Node nextSibling)

Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.

DOMResult(Node node, Node nextSibling, String systemId)

Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and the specified System ID.

Public Method Summary

Node
getNextSibling()

Get the child node before which the result nodes will be inserted.

Node
getNode()

Get the node that will contain the result DOM tree.

String
getSystemId()

Get the System Identifier.

void
setNextSibling(Node nextSibling)

Set the child node before which the result nodes will be inserted.

void
setNode(Node node)

Set the node that will contain the result DOM tree.

void
setSystemId(String systemId)

Set the systemId that may be used in association with the node.

Inherited Method Summary

Constants

public static final String FEATURE

If getFeature(String) returns true when passed this value as an argument, the Transformer supports Result output of this type.

Constant Value: "http://javax.xml.transform.dom.DOMResult/feature"

Public Constructors

public DOMResult ()

Zero-argument default constructor.

node, siblingNode and systemId will be set to null.

public DOMResult (Node node)

Use a DOM node to create a new output target.

In practice, the node should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

siblingNode and systemId will be set to null.

Parameters
node The DOM node that will contain the result tree.

public DOMResult (Node node, String systemId)

Use a DOM node to create a new output target with the specified System ID.

In practice, the node should be a Document node, a DocumentFragment node, or a Element node. In other words, a node that accepts children.

siblingNode will be set to null.

Parameters
node The DOM node that will contain the result tree.
systemId The system identifier which may be used in association with this node.

public DOMResult (Node node, Node nextSibling)

Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted bef