title: Javascript works in FF / IE but not Chrome / Safari
body: <p>I'm working on a Drupal 6 module where I use jquery (and more specifically, the $.ajax method) to retrieve a RSS feed from Yahoo's weather API. I decided against using the JFeed library because I need access to the elements with "yweather" prefix (and I couldn't find a way of accessing them via JFeed). I decided to use the $.ajax method and parse the XML response instead. The JavaScript code below works fine in Firefox and IE but does not work in Safari (or Chrome FWIW):</p>
  
  <pre><code>function parseXml(xml) {
    var atmosphere = xml.getElementsByTagName("yweather:atmosphere");
  
    var humidity = atmosphere[0].getAttribute("humidity");
  
    $('#weatherFeed').html("Humidity: " + humidity);
    $('#weatherFeed').append(
       "&lt;div style=\"text-align: center;margin-left: auto; margin-right: auto;\"&gt;" + 
       city + ", " + state + "&lt;/div&gt;");
  }
  
  function getData(){
     $.ajax({
        type:   'GET',
        url:    'proxy.php?url=http://weather.yahooapis.com/forecastrss&amp;p=94041',
        dataType: 'xml',
        success:  function(xml) {
        parseXml(xml);
   }
   }); 
  }
  
  if(Drupal.jsEnabled) {
  $(function() {
        getData();
        setInterval("getData()", 30000);
        });   
  }
  </code></pre>
  
  <p>When I check the error console in Safari I see the following error message: <code>TypeError: Result of expression 'atmosphere[0]' [undefined] is not an object.</code> Is there an issue with using getElementsByTagName in Safari? Should I be accessing the object that's returned by getElementsByTagName differently?</p>