Class Text
XML DOM Text Interface.
See the Text the CharacterData, and Node interfaces.
Tables
Text.properties | Properties of the Text class, beyond the Node class. |
Methods
Text:replaceWholeText (content) | Not implemented. |
Text:splitText (offset) | Splits a text node, implements splitText. |
Text:write (buffer) | exports the XML. |
Tables
- Text.properties
-
Properties of the Text class, beyond the Node class.
Fields:
- wholeText the whole text of the node and adjacent nodes (DOM level 3 property, readonly)
- isElementContentWhitespace boolean if the text is whitespace (DOM level 3 property, readonly)
Methods
- Text:replaceWholeText (content)
-
Not implemented. Replaces existing text nodes (DOM 3 method), implements replaceWholeText.
Parameters:
- content string the new text content.
Returns:
-
the new Text node, or nil+err
- Text:splitText (offset)
-
Splits a text node, implements splitText.
Indices 1-indexed, and based on UTF-8 characters, not bytes.
Parameters:
- offset int start character
Returns:
-
the new node, or nil+err
- Text:write (buffer)
-
exports the XML.
Parameters:
- buffer array an array to which the chunks can be added.
Returns:
-
the buffer array