title: Cannot read property 'getElementsByTagName' of null
body: <p>I've been searching around for answers to this particular problem for about two days now. I can't seem to figure out what's going on with it. All this seemed to have worked in the past but isn't working anymore.</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;ZipCodes&gt;
  &lt;results&gt;
      &lt;city&gt;Chicago&lt;/city&gt;
      &lt;state&gt;IL&lt;/state&gt;
      &lt;timezone&gt;-6&lt;/timezone&gt;
  &lt;/results&gt;
  </code></pre>
  
  <p></p>
  
  <p>javascript:</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","_checkzip.php?zip="+str,true);
  xmlhttp.send();
  xmlDoc=xmlhttp.responseXML; 
  
  x=xmlDoc.getElementsByTagName("results");
  i=0;
  
  
  
      document.forms["signup"]["City"].value=(x[i].getElementsByTagName("city")[0].childNodes[0].nodeValue);
      document.forms["signup"]["states"].value=(x[i].getElementsByTagName("state")[0].childNodes[0].nodeValue);
      document.forms["signup"]["TimeZone"].value=(x[i].getElementsByTagName("timezone")[0].childNodes[0].nodeValue);
  </code></pre>
  
  <p>and the error I get is</p>
  
  <pre><code>Cannot read property 'getElementsByTagName' of null
  </code></pre>
  
  <p>when I try x=xmlDoc.getElementsByTagName("results");  The xml is deffinetly coming in on the network response when I look at the debug in Chrome.</p>