Synopsis
This creates a new Text
node that contains the given data
string.
Argument
- data: DOMString
The string that will be the contents of the new
node.
Java binding
public Text createTextNode(String data);
Java example
// Create a new node that contains character data
Text txtDesc = doc.createTextNode(
"Character data contents for a new Element.");