# Class Comment

Comment

A representation of an XML `Comment` node.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `detach()` | `Content|null` | Detaches the node from its parent `Element` node. |
| `getParentElement()` | `Element|null` | Gets the node's parent `Element` node. |
| `getText()` | `String` | Gets the text value of the `Comment` node. |
| `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. |
| `setText(text)` | `Comment` | Sets the text value of the `Comment` node. |

## Detailed documentation

### `detach()`

Detaches the node from its parent `Element` node. If the node does not have a parent,
this method has no effect.

#### Return


`Content|null` --- The detached node.

*** ** * ** ***

### `getParentElement()`

Gets the node's parent `Element` node. If the node does not have a parent, this method
returns `null`.

#### Return


`Element|null` --- The parent `Element` node.

*** ** * ** ***

### `getText()`

Gets the text value of the `Comment` node.

#### Return


`String` --- The text value of the `Comment` 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 `Comment` node.

#### Parameters

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

#### Return


`Comment` --- The `Comment` node, for chaining.