# DOMResult

public class **DOMResult** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
implements [Result](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html) <br />

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 `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#getNode()`.

<br />

### Constant Summary

|---|---|---|
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [FEATURE](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#FEATURE) | If `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/TransformerFactory.html#getFeature(java.lang.String)` returns `true` when passed this value as an argument, the `Transformer` supports `Result` output of this type. |

### Inherited Constant Summary

From interface [javax.xml.transform.Result](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html)

|---|---|---|
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [PI_DISABLE_OUTPUT_ESCAPING](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html#PI_DISABLE_OUTPUT_ESCAPING) | The name of the processing instruction that is sent if the result tree disables output escaping. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [PI_ENABLE_OUTPUT_ESCAPING](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html#PI_ENABLE_OUTPUT_ESCAPING) | The name of the processing instruction that is sent if the result tree enables output escaping at some point after having received a PI_DISABLE_OUTPUT_ESCAPING processing instruction. |

### Public Constructor Summary

|---|---|
|   | [DOMResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult())() Zero-argument default constructor. |
|   | [DOMResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node) Use a DOM node to create a new output target. |
|   | [DOMResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20java.lang.String))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Use a DOM node to create a new output target with the specified System ID. |
|   | [DOMResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling) Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before. |
|   | [DOMResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node,%20java.lang.String))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) 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](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) | [getNextSibling](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#getNextSibling())() Get the child node before which the result nodes will be inserted. |
| [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) | [getNode](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#getNode())() Get the node that will contain the result DOM tree. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#getSystemId())() Get the System Identifier. |
| void | [setNextSibling](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setNextSibling(org.w3c.dom.Node))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling) Set the child node before which the result nodes will be inserted. |
| void | [setNode](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setNode(org.w3c.dom.Node))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node) Set the node that will contain the result DOM tree. |
| void | [setSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setSystemId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Set the systemId that may be used in association with the node. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [javax.xml.transform.Result](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html)

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html#getSystemId())() Get the system identifier that was set with setSystemId. |
| abstract void | [setSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html#setSystemId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Set the system identifier for this Result. |

## Constants

#### public static final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**FEATURE**

<br />

If `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/TransformerFactory.html#getFeature(java.lang.String)`
returns `true` when passed this value as an argument,
the `Transformer` supports `Result` output of this type.

<br />

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

## Public Constructors

#### public
**DOMResult**
()

<br />

Zero-argument default constructor.

`node`,
`siblingNode` and
`systemId`
will be set to `null`.

<br />

#### public
**DOMResult**
([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node)

<br />

Use a DOM node to create a new output target.

In practice, the node should be
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` node,
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/DocumentFragment.html` node, or
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Element.html` node.
In other words, a node that accepts children.

`siblingNode` and
`systemId`
will be set to `null`.

<br />

##### Parameters

| node | The DOM node that will contain the result tree. |
|---|---|

#### public
**DOMResult**
([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

<br />

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


In practice, the node should be
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` node,
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/DocumentFragment.html` node, or
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Element.html` node.
In other words, a node that accepts children.

`siblingNode` will be set to `null`.

<br />

##### 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](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling)

<br />

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

In practice, `node` and `nextSibling` should be
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` node,
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/DocumentFragment.html` node, or
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Element.html` node.
In other words, a node that accepts children.

Use `nextSibling` to specify the child node
where the result nodes should be inserted before.
If `nextSibling` is not a sibling of `node`,
then an `IllegalArgumentException` is thrown.
If `node` is `null` and `nextSibling` is not `null`,
then an `IllegalArgumentException` is thrown.
If `nextSibling` is `null`,
then the behavior is the same as calling `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node)`,
i.e. append the result nodes as the last child of the specified `node`.

`systemId` will be set to `null`.

<br />

##### Parameters

| node | The DOM node that will contain the result tree. |
| nextSibling | The child node where the result nodes should be inserted before. |
|---|---|

##### Throws

| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | If `nextSibling` is not a sibling of `node`. |
| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | If `node` is `null` and `nextSibling` is not `null`. |
|---|---|

#### public
**DOMResult**
([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node, [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

<br />

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.

In practice, `node` and `nextSibling` should be
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` node,
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/DocumentFragment.html` node, or a
`https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Element.html` node.
In other words, a node that accepts children.

Use `nextSibling` to specify the child node
where the result nodes should be inserted before.
If `nextSibling` is not a sibling of `node`,
then an `IllegalArgumentException` is thrown.
If `node` is `null` and `nextSibling` is not `null`,
then an `IllegalArgumentException` is thrown.
If `nextSibling` is `null`,
then the behavior is the same as calling `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20java.lang.String)`,
i.e. append the result nodes as the last child of the specified node and use the specified System ID.

<br />

##### Parameters

| node | The DOM node that will contain the result tree. |
| nextSibling | The child node where the result nodes should be inserted before. |
| systemId | The system identifier which may be used in association with this node. |
|---|---|

##### Throws

| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | If `nextSibling` is not a sibling of `node`. |
| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | If `node` is `null` and `nextSibling` is not `null`. |
|---|---|

## Public Methods

#### public [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html)
**getNextSibling**
()

<br />

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

If no node was set via
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node,%20java.lang.String)` or
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setNextSibling(org.w3c.dom.Node)`,
then `null` will be returned.

<br />

##### Returns

- The child node before which the result nodes will be inserted.

#### public [Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html)
**getNode**
()

<br />

Get the node that will contain the result DOM tree.

If no node was set via
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20java.lang.String)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node,%20java.lang.String)` or
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setNode(org.w3c.dom.Node)`,
then the node will be set by the transformation, and may be obtained from this method once the transformation is complete.
Calling this method before the transformation will return `null`.

<br />

##### Returns

- The node to which the transformation will be appended.

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getSystemId**
()

<br />

Get the System Identifier.

If no System ID was set via
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20java.lang.String)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node,%20org.w3c.dom.Node,%20java.lang.String)` or
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#setSystemId(java.lang.String)`,
then `null` will be returned.

<br />

##### Returns

- The system identifier.

#### public void
**setNextSibling**
([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) nextSibling)

<br />

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

Use `nextSibling` to specify the child node
before which the result nodes should be inserted.
If `nextSibling` is not a descendant of `node`,
then an `IllegalArgumentException` is thrown.
If `node` is `null` and `nextSibling` is not `null`,
then an `IllegalStateException` is thrown.
If `nextSibling` is `null`,
then the behavior is the same as calling `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMResult.html#DOMResult(org.w3c.dom.Node)`,
i.e. append the result nodes as the last child of the specified `node`.

<br />

##### Parameters

| nextSibling | The child node before which the result nodes will be inserted. |
|---|---|

##### Throws

| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | If `nextSibling` is not a descendant of `node`. |
| [IllegalStateException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalStateException.html) | If `node` is `null` and `nextSibling` is not `null`. |
|---|---|

#### public void
**setNode**
([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) node)

<br />

Set the node that will contain the result DOM tree.


In practice, the node should be
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` node,
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/DocumentFragment.html` node, or
a `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Element.html` node.
In other words, a node that accepts children.

An `IllegalStateException` is thrown if `nextSibling` is not `null` and
`node` is not a parent of `nextSibling`.
An `IllegalStateException` is thrown if `node` is `null` and
`nextSibling` is not `null`.

<br />

##### Parameters

| node | The node to which the transformation will be appended. |
|---|---|

##### Throws

| [IllegalStateException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalStateException.html) | If `nextSibling` is not `null` and `nextSibling` is not a child of `node`. |
| [IllegalStateException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalStateException.html) | If `node` is `null` and `nextSibling` is not `null`. |
|---|---|

#### public void
**setSystemId**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

<br />

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

<br />

##### Parameters

| systemId | The system identifier as a URI string. |
|---|---|