XML DOM - TextObject
Text object
The Text object represents the text content of an element or attribute.
Text Object Properties
| Property | Description |
|---|---|
| data | Sets or returns the text of an element or attribute. |
| isElementContentWhitespace | Determines whether the text node contains whitespace character content. If the text node contains whitespace character content, it returns true; otherwise, it returns false. |
| length | Returns the text length of an element or attribute. |
| wholeText | Returns all text of adjacent text nodes to this node in document order. |
Text Object Methods
| Methods | Description |
|---|---|
| appendData() | Appends data to a node. |
| deleteData() | Deletes data from a node. |
| insertData() | Inserts data into a node. |
| replaceData() | Replaces data in a node. |
| replaceWholeText(text) | Replaces this node and all adjacent text nodes with the specified text. |
| splitText() | Splits this node into two nodes at the specified offset, returning the new node that contains the text after the offset. |
| substringData() | Extracts data from a node. |
other extensions