title: Convert xml to string with jQuery
body: <p>I'm loading an xml file with jQuery ajax loader, and need to convert it to a string so that I can save it out again using PHP post variables.  What is the best way to do this?</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  
  jQuery.ajax({
      type: "GET",
      url: "data.xml",
      dataType: "xml",
      success: parseXML
      });
  
  
  function parseXML(xml) {
  
      var xml_string = jQuery(xml).text();  // (This doesn't work- returns tagless, unformatted text) 
      alert(xml_string);
  
  }
  
  &lt;/script&gt;
  </code></pre>