public void setTextContent(String textContent) throws DOMException { // get rid of any existing children Node child; while ((child = getFirstChild()) != null) { removeChild(child); } // create a Text node to hold the given content if (textContent != null && textContent.length() != 0){ appendChild(ownerDocument().createTextNode(textContent)); } }
protected void makeChildNode() { if (hasStringValue()) { if (value != null) { TextImpl text = (TextImpl) ownerDocument().createTextNode((String) value); value = text; text.isFirstChild(true); text.previousSibling = text; text.ownerNode = this; text.isOwned(true); } hasStringValue(false); } }
Text newNode = this.ownerDocument().createTextNode(content); if (parent != null) { // check if node in the tree parent.insertBefore(newNode, this);
newnode = createTextNode(source.getNodeValue()); break;
Text text = fDocument.createTextNode(node.getNodeValue()); Node parent = node.getParentNode(); node = parent.replaceChild(text, node);
textNode = (TextImpl) ownerDocument.createTextNode((String) value); value = textNode; textNode.isFirstChild(true); textNode = (TextImpl) ownerDocument.createTextNode(newvalue);