# DOMSource

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

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

Note that XSLT requires namespace support. Attempting to transform a DOM
that was not contructed with a namespace-aware parser may result in errors.
Parsers can be made namespace aware by calling
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/parsers/DocumentBuilderFactory.html#setNamespaceAware(boolean)`.

<br />

##### See Also

- [Document Object Model (DOM) Level 2 Specification](http://www.w3.org/TR/DOM-Level-2)

### 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/DOMSource.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 Source input of this type. |

### Public Constructor Summary

|---|---|
|   | [DOMSource](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.html#DOMSource())() Zero-argument default constructor. |
|   | [DOMSource](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.html#DOMSource(org.w3c.dom.Node))([Node](https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Node.html) n) Create a new input source with a DOM node. |
|   | [DOMSource](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.html#DOMSource(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) Create a new input source with a DOM node, and with the system ID also passed in as the base URI. |

### Public Method Summary

|---|---|
| [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/DOMSource.html#getNode())() Get the node that represents a Source 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/DOMSource.html#getSystemId())() Get the base ID (URL or system ID) from where URLs will be resolved. |
| void | [setNode](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.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 represents a Source DOM tree. |
| void | [setSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.html#setSystemId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemID) Set the base ID (URL or system ID) from where URLs will be resolved. |

### 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.Source](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Source.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/Source.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/Source.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 Source. |

## Constants

#### public static final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.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 Source input of this type.
Constant Value: "http://javax.xml.transform.dom.DOMSource/feature"

## Public Constructors

#### public
**DOMSource**
()

<br />

Zero-argument default constructor. If this constructor is used, and
no DOM source is set using `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/dom/DOMSource.html#setNode(org.w3c.dom.Node)` , then the
`Transformer` will
create an empty source `https://developers.google.com/j2objc/javadoc/jre/reference/org/w3c/dom/Document.html` using
`https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/parsers/DocumentBuilder.html#newDocument()`.

<br />

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Transformer.html#transform(javax.xml.transform.Source,%20javax.xml.transform.Result)`

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

Create a new input source with a DOM node. The operation
will be applied to the subtree rooted at this node. In XSLT,
a "/" pattern still means the root of the tree (not the subtree),
and the evaluation of global variables and parameters is done
from the root node also.

##### Parameters

| n | The DOM node that will contain the Source tree. |
|---|---|

#### public
**DOMSource**
([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)

Create a new input source with a DOM node, and with the
system ID also passed in as the base URI.

##### Parameters

| node | The DOM node that will contain the Source tree. |
| systemID | Specifies the base URI associated with node. |
|---|---|

## Public Methods

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

Get the node that represents a Source DOM tree.

##### Returns

- The node that is to be transformed.

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

Get the base ID (URL or system ID) from where URLs
will be resolved.

##### Returns

- Base URL for this DOM tree.

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

Set the node that will represents a Source DOM tree.

##### Parameters

| node | The node that is to be transformed. |
|---|---|

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

Set the base ID (URL or system ID) from where URLs
will be resolved.

##### Parameters

| systemID | Base URL for this DOM tree. |
|---|---|