code: public boolean setNodeText(Document domDocument, Node n, String value) {
          if (n == null)
              return false;
          Node nc = null;
          while ((nc = n.getFirstChild()) != null) {
              n.removeChild(nc);
          }
          n.appendChild(domDocument.createTextNode(value));
          return true;
      }
docs: Sets the text of this node. All the child's node are deleted and a new
  child text node is created.
  @param domDocument the <CODE>Document</CODE> that contains the node
  @param n the <CODE>Node</CODE> to add the text to
  @param value the text to add