use of jodd.lagarto.dom.Text in project jodd by oblac.
the class Jerry method text.
/**
* Sets the content of each element in the set of matched elements to the specified text.
*/
public Jerry text(String text) {
if (nodes.length == 0) {
return this;
}
if (text == null) {
text = StringPool.EMPTY;
}
for (Node node : nodes) {
node.removeAllChilds();
Text textNode = new Text(node.getOwnerDocument(), text);
node.addChild(textNode);
}
return this;
}