title: Processing XML with jQuery cross-browser
body: <p>I am new to jQuery and am having cross-browser inconsistencies. I am trying to populate an HTML drop down using jQuery to parse the XML document. Eventually, I will swap the XML document with an HTTP call, but for now, I am doing a GET of the local XML copy. My approach works in Firefox (2 elements show up in the drop down) but IE7 isn't processing the XML as desired. IE7 doesn't seem to be parsing the XML at all.<br>
  Here is my snippet:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head id="Head1" runat="server"&gt;
  &lt;script src="jquery-1.3.2.js"&gt;&lt;/script&gt;
  
  &lt;title&gt;test&lt;/title&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
  &lt;script&gt;
  
      $(document).ready(function() {
          $.ajax({
              type: "GET",
              url: "data.xml",
              dataType: ($.browser.msie) ? "text/xml" : "xml",
              success: function(xml) {
                  var select = $('#aoi');
                  $(xml).find('area').each(function() {
                      var name = $(this).find('name').text();
                      var type = $(this).find('type').text(); 
          //alert(name + " : " + type);
                      select.append("&lt;option&gt;" + name + " : " + type + "&lt;/option&gt;");
                  });
                  select.children(":first").text("please make a selection").attr("selected", true);
              }
          });
      });
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" method="post" &gt;
      &lt;table border=".1" cellpadding="7" cellspacing="1" align="center" width="600" style="border-collapse: collapse;"&gt;
  
      &lt;tr&gt;
          &lt;td&gt;Shape&lt;/td&gt;
          &lt;td&gt;
              &lt;select id="aoi"&gt;
                  &lt;option&gt;loading&lt;/option&gt;
              &lt;/select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the XML file (data.xml) is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;  
  &lt;areasofinterest&gt;  
    &lt;area id="1"&gt;  
      &lt;id&gt;1&lt;/id&gt;  
      &lt;name&gt;square&lt;/name&gt;  
      &lt;type&gt;UserDefined&lt;/type&gt;  
    &lt;/area&gt;  
    &lt;area id="2"&gt;  
      &lt;id&gt;2&lt;/id&gt;  
      &lt;name&gt;small square&lt;/name&gt;  
      &lt;type&gt;UserDefined&lt;/type&gt;  
    &lt;/area&gt;  
  &lt;/areasofinterest&gt;  
  </code></pre>
  
  <p>Thank you for your help!</p>