can't access child node's value but i can access child node's name
<p>when i try to access child nodes i can , but i can't access their value it says null</p>

<pre><code>     if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.open("GET","obj.xml",false);
    xmlhttp.send();
    xmlDoc=xmlhttp.responseXML;
    x=xmlDoc.getElementsByTagName("Objnode")[0].childNodes; 
    y=xmlDoc.getElementsByTagName("Objnode")[0].firstChild;    
    for (i=0;i&lt;x.length;i++)
    {
    if (y.nodeType==1)
      {//Process only element nodes (type 1)
      document.write(y.nodeName + "&lt;br&gt;"); change it to y.nodeValue it says null!
      }
    y=y.nextSibling;
    }
</code></pre>

<p>my xml is like</p>

<pre><code>    &lt;Objnode&gt;
            &lt;Object1&gt;something&lt;/Object1&gt;
            &lt;Object2&gt;something&lt;/Object2&gt;
    &lt;/Objnode&gt;
</code></pre>

<p>above code works but the line</p>

<pre><code>document.write(y.nodeName + "&lt;br&gt;"); 
</code></pre>

<p>when changed it to y.nodeValue it says null!</p>
