title: accessing value of XML file in javascript
body: <p>I load an XML document using XMLHTTPRequest in my js file as below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RMFSFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;Host&gt;www.example.com&lt;/Host&gt;
  &lt;Port&gt;8888&lt;/Port&gt;   
  &lt;Uri&gt;www.example.com&lt;/Uri&gt;
  &lt;Path&gt;
      &lt;HD&gt;
          &lt;UNC&gt;path1&lt;/UNC&gt;
      &lt;/HD&gt;
      &lt;SD&gt;
          &lt;UNC&gt;path2&lt;/UNC&gt;
      &lt;/SD&gt;
  &lt;/Path&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am trying to SELECT the value of "<strong>UNC</strong>" for HD using javascript.</p>
  
  <p>I have tried something like below, which didn't work: </p>
  
  <pre><code>      var x = xml.getElementsByTagName('Path')[0];
        var y = x.getElementsByTagName('HD');
        var z = y.getElementsByTagName('UNC');
  </code></pre>
  
  <p>Any idea How Can I retrieve the Path?</p>