XML DOM Text Object

Text object

Text object represents the text content of the element or attribute.

Properties of Text object

Property Description
data Set or return the text of the element or attribute.
isElementContentWhitespace Determine whether the text node contains whitespace character content.
length Return the text length of the element or attribute.
wholeText Return all text of adjacent text nodes of the node, concatenated in document order.

Methods of Text object

Method Description
appendData() Append data to the node.
deleteData() Delete data from the node.
insertData() Insert data into the node.
replaceData() Replace the data in the node.
replaceWholeText(text) Replace the text of this node and all adjacent text nodes with the specified text.
splitText() Split a Text node into two.
substringData() Extract data from the node.