title: How to parse this XML using javascript DOM?
body: <p>This is my xml </p>
  
  <pre><code>&lt;colors&gt;
  &lt;SET name="temp"&gt;
      &lt;menu&gt;#9c7db5&lt;/menu&gt;
      &lt;menuTxt&gt;#ffffff&lt;/menuTxt&gt;
      &lt;tH&gt;#FFF&lt;/tH&gt;
      &lt;tHTxt&gt;#000&lt;/tHTxt&gt;
      &lt;head&gt;#919191&lt;/head&gt;
      &lt;headTxt&gt;#ffffff&lt;/headTxt&gt;
      &lt;label&gt;#2e2e2e&lt;/label&gt;
      &lt;but&gt;#8f8f8f&lt;/but&gt;
      &lt;butTxt&gt;#ffffff&lt;/butTxt&gt;
      &lt;footer&gt;#FFF&lt;/footer&gt;
      &lt;footTxt&gt;#000&lt;/footTxt&gt;
      &lt;backT&gt;#FFF&lt;/backT&gt;
  &lt;/SET&gt;
  &lt;SET name="footercheck"&gt;
      &lt;menu&gt;#6492c4&lt;/menu&gt;
      &lt;menuTxt&gt;#ffffff&lt;/menuTxt&gt;
      &lt;tH&gt;#FFF&lt;/tH&gt;
      &lt;tHTxt&gt;#000&lt;/tHTxt&gt;
      &lt;head&gt;#4275b3&lt;/head&gt;
      &lt;headTxt&gt;#ffffff&lt;/headTxt&gt;
      &lt;label&gt;#0a0a66&lt;/label&gt;
      &lt;but&gt;#3b66a8&lt;/but&gt;
      &lt;butTxt&gt;#ffffff&lt;/butTxt&gt;
      &lt;footer&gt;#5f90b0&lt;/footer&gt;
      &lt;footTxt&gt;#ffffff&lt;/footTxt&gt;
      &lt;backT&gt;#FFF&lt;/backT&gt;
  &lt;/SET&gt;
  &lt;/colors&gt;
  </code></pre>
  
  <p>User will search by 'name' attributes of <code>&lt;SET&gt;</code> tag. Once the given name is matched with any <code>&lt;SET&gt;</code> tag, I need to get all it's child nodes value. (<code>&lt;menu&gt;&lt;menutxt&gt;</code>..etc).</p>
  
  <p>This is what I have tried so far, </p>
  
  <pre><code>function parseXML{
                     if (window.XMLHttpRequest)
          {
              xmlhttp=new XMLHttpRequest();
          }
          else
          {
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }var y;
          xmlhttp.open("GET","style/userTheme.xml",false);
          xmlhttp.send();
          xmlDoc=xmlhttp.responseXML;
          var x=xmlDoc.getElementsByName(iid); //'iid' is user's input
          for (var i = 0; i &lt; x.length; i++) {   
              x[i].childNodes[0].nodeValue
          } 
  }
  </code></pre>
  
  <p>I've checked length of 'X', It's '1'. So It's filtering whole XML to One <code>&lt;SET&gt;</code>. But I don't know how to proceed further.
  Please drop me an answer if you know.</p>