/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Splits this CDATA node into parts that do not contain a "]]>" sequence. * Any newly created nodes will be inserted before this node. */ public void split() { if (!needsSplitting()) { return; } Node parent = getParentNode(); String[] parts = getData().split("\\]\\]>"); parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this); for (int p = 1; p < parts.length - 1; p++) { parent.insertBefore(new CDATASectionImpl(document, ">" + parts[p] + "]]"), this); } setData(">" + parts[parts.length - 1]); }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }
/** * Replaces this node with a semantically equivalent text node. This node * will be removed from the DOM tree and the new node inserted in its place. * * @return the replacement node. */ public TextImpl replaceWithText() { TextImpl replacement = new TextImpl(document, getData()); parent.insertBefore(replacement, this); parent.removeChild(this); return replacement; } }