Text

A representation of an XML `Text` node.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/xml-service/text#append(String)` | `https://developers.google.com/apps-script/reference/xml-service/text#` | Appends the given text to any content that already exists in the node. |
| `https://developers.google.com/apps-script/reference/xml-service/text#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/text#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/text#getText()` | `String` | Gets the text value of the `Text` node. |
| `https://developers.google.com/apps-script/reference/xml-service/text#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/text#setText(String)` | `https://developers.google.com/apps-script/reference/xml-service/text#` | Sets the text value of the `Text` node. |

## Detailed documentation

### `append(text)`

Appends the given text to any content that already exists in the node.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `String` | The text to append to the node. |

#### Return


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

*** ** * ** ***

### `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.

*** ** * ** ***

### `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.

*** ** * ** ***

### `getText()`

Gets the text value of the `Text` node.

#### Return


`String` --- The text value of the `Text` node.

*** ** * ** ***

### `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.

*** ** * ** ***

### `setText(text)`

Sets the text value of the `Text` node.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `String` | The text value to set. |

#### Return


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