title: Changing the value of a xml tag
body: <p>I have a document  org.w3c.dom.Document and i want to replace the value of a particular tag in xml.I have tried following but somehow it doesnot work.It doesnot give error but i cant see the change in value.</p>
  
  <p>org.w3c.dom.Document</p>
  
  <pre><code>public boolean SetTextInTag(Document doc, String tag, String nodeValue)
      {
          Node node = getFirstNode(doc, tag);
          if( node != null){
              node.setNodeValue(nodeValue);
              return true;
             }
           return false;
     }
  </code></pre>
  
  <p>EG</p>
  
  <pre><code> &lt;mytag&gt; this value is to be changed &lt;/mytag&gt;
  </code></pre>
  
  <p>I want the tag value to be chnaged to nodeValue.My code doesnot give any error but i cant see the change in value.</p>