DocType

A representation of an XML `DocumentType` node.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#detach()` | `https://developers.google.com/apps-script/reference/xml-service/content|null` | Detaches the node from its parent `https://developers.google.com/apps-script/reference/xml-service/element` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getElementName()` | `String` | Gets the name of the root `https://developers.google.com/apps-script/reference/xml-service/element` node specified in the `DocType` declaration. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getInternalSubset()` | `String` | Gets the internal subset data for the `DocumentType` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getParentElement()` | `https://developers.google.com/apps-script/reference/xml-service/element|null` | Gets the node's parent `https://developers.google.com/apps-script/reference/xml-service/element` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getPublicId()` | `String` | Gets the public ID of the external subset data for the `DocumentType` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getSystemId()` | `String` | Gets the system ID of the external subset data for the `DocumentType` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#getValue()` | `String` | Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#setElementName(String)` | `https://developers.google.com/apps-script/reference/xml-service/doc-type#` | Sets the name of the root `https://developers.google.com/apps-script/reference/xml-service/element` node to specify in the `DocType` declaration. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#setInternalSubset(String)` | `https://developers.google.com/apps-script/reference/xml-service/doc-type#` | Sets the internal subset data for the `DocumentType` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#setPublicId(String)` | `https://developers.google.com/apps-script/reference/xml-service/doc-type#` | Sets the public ID of the external subset data for the `DocumentType` node. |
| `https://developers.google.com/apps-script/reference/xml-service/doc-type#setSystemId(String)` | `https://developers.google.com/apps-script/reference/xml-service/doc-type#` | Sets the system ID of the external subset data for the `DocumentType` node. |

## Detailed documentation

### `detach()`

Detaches the node from its parent `https://developers.google.com/apps-script/reference/xml-service/element` node. If the node does not have a parent,
this method has no effect.

#### Return


`https://developers.google.com/apps-script/reference/xml-service/content|null` --- The detached node.

*** ** * ** ***

### `getElementName()`

Gets the name of the root `https://developers.google.com/apps-script/reference/xml-service/element` node specified in the `DocType` declaration.

#### Return


`String` --- The name of the root `Element` node specified in the `DocType` declaration.

*** ** * ** ***

### `getInternalSubset()`

Gets the internal subset data for the `DocumentType` node.

#### Return


`String` --- The internal subset data.

*** ** * ** ***

### `getParentElement()`

Gets the node's parent `https://developers.google.com/apps-script/reference/xml-service/element` node. If the node does not have a parent, this method
returns `null`.

#### Return


`https://developers.google.com/apps-script/reference/xml-service/element|null` --- The parent `Element` node.

*** ** * ** ***

### `getPublicId()`

Gets the public ID of the external subset data for the `DocumentType` node.

#### Return


`String` --- The public ID of the external subset data.

*** ** * ** ***

### `getSystemId()`

Gets the system ID of the external subset data for the `DocumentType` node.

#### Return


`String` --- The system ID of the external subset data.

*** ** * ** ***

### `getValue()`

Gets the text value of all nodes that are direct or indirect children of the node, in the order
they appear in the document.

#### Return


`String` --- The text value of all nodes that are direct or indirect children of the node.

*** ** * ** ***

### `setElementName(name)`

Sets the name of the root `https://developers.google.com/apps-script/reference/xml-service/element` node to specify in the `DocType`
declaration.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `name` | `String` | The name of the root `Element` node to specify in the `DocType` declaration. |

#### Return


`https://developers.google.com/apps-script/reference/xml-service/doc-type#` --- The `DocumentType` node, for chaining.

*** ** * ** ***

### `setInternalSubset(data)`

Sets the internal subset data for the `DocumentType` node.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `data` | `String` | The internal subset data to set. |

#### Return


`https://developers.google.com/apps-script/reference/xml-service/doc-type#` --- The `DocumentType` node, for chaining.

*** ** * ** ***

### `setPublicId(id)`

Sets the public ID of the external subset data for the `DocumentType` node.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `id` | `String` | The public ID of the external subset data to set. |

#### Return


`https://developers.google.com/apps-script/reference/xml-service/doc-type#` --- The `DocumentType` node, for chaining.

*** ** * ** ***

### `setSystemId(id)`

Sets the system ID of the external subset data for the `DocumentType` node.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `id` | `String` | The system ID of the external subset data to set. |

#### Return


`https://developers.google.com/apps-script/reference/xml-service/doc-type#` --- The `DocumentType` node, for chaining.