title: How to save XML response locally with jQuery?
body: <p>I'm making an AJAX request. The returned <code>response</code> is a XML.</p>
  
  <p>How can I let the user save the <code>response</code> as a XML file locally on <code>success</code> ?</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: url,
      data: JSON.stringify(myJson),
      contentType: "application/json",
      dataType: format,
      success: function(response)
      {
          console.log("Exported JSON: " + JSON.stringify(myJson));
          console.log(response);
          jQuery.parseXML(response);
      },
      error: function()
      {
          console.log(arguments);
          alert("Export process failed.");
      }
  });
  </code></pre>
  
  <p>The <code>format</code> in this case is <code>xml</code>.</p>