XML DOM - Text Object
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 if the text node contains whitespace characters. Returns true if the text node contains whitespace characters, otherwise returns false. |
| length |
Returns the length of the text of an element or attribute. |
| wholeText |
Returns all adjacent text nodes of this node in the document order. |
Text Object Methods
| Method |
Description |
| appendData() |
Appends data to the node. |
| deleteData() |
Deletes data from the node. |
| insertData() |
Inserts data into the node. |
| replaceData() |
Replaces data in the 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, and returns the new node containing the text after the offset. |
| substringData() |
Extracts data from the node. |