title: How can I consume an XML webservice?
body: <p>I am using following jQuery ajax method to consume xml based webservice  Please find jquery code as well. But I am unable to grab the data. Similar code works for jsonp but fails with xml. What am I missing?</p>
  
  <p>Update:Local copy works on chrome but not in mozilla.
      
      </p>
  
  <pre><code>&lt;script src="https://code.jquery.com/jquery-2.1.4.min.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  
  $(document).ready(function () {
  
  
      $('#myButton').click(function () {
          var artistURL = "http://www.thomas-bayer.com/sqlrest/CUSTOMER/0/";
  
          $.ajax({
              type: "GET",
              dataType: "xml",
              url: artistURL,
              success: function (data) {
                  $(data).find("CUSTOMER").each(function () {
                      $(this).find("FIRSTNAME").each(function () {
                              $("#semi").text($(this).text());
                      });
                  });
              }
          });
      });
  })
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;button id="myButton"&gt; Click Me&lt;/button&gt;
  &lt;p id="semi"&gt;&lt;/p&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>