code: public void setNodeText(Node n, String text) {
          if (n == null)
              return;
          Node nc = null;
          while ((nc = n.getFirstChild()) != null) {
              n.removeChild(nc);
          }
          if (n.getAttributes().getNamedItemNS(XFA_DATA_SCHEMA, "dataNode") != null)
              n.getAttributes().removeNamedItemNS(XFA_DATA_SCHEMA, "dataNode");
          n.appendChild(domDocument.createTextNode(text));
          changed = true;
      }
docs: Sets the text of this node. All the child's node are deleted and a new
  child text node is created.
  @param n the <CODE>Node</CODE> to add the text to
  @param text the text to add