klyn.io.xml.dom.XMLText.replaceWholeText
method
public replaceWholeText(content as String) as Text throws DOMException
Description

Replaces adjacent Text and CDATA siblings with this node's new content. Empty content removes this node as well.

Parameters
ParameterDescription
contentReplacement text; null acts as empty text.
Returns

This node, or null when it was removed.

Throws
  • DOMException if the DOM operation violates document ownership, hierarchy, naming, index, or node-state constraints.
Example
remaining = text.replaceWholeText("replacement")