title: How do I get the entire XML string from a XMLDocument returned by jQuery (cross browser)?
body: <p>I have tried and failed to find out how to get the entire XML string from the XMLDocument returned by a GET. There are a lot of questions on SO on how to find or replace specific elements in the object, but I can't seem to find any answer to how to get the entire document as a string.</p>
  
  <p>The example I'm working with is from <a href="http://www.ibm.com/developerworks/library/x-ajaxjquery.html" rel="noreferrer">here</a>. The "do something with xml"-part is where I'm at at the moment. I get the feeling that this should be really trivial, but I fail to find out how. Is there an "xml.data()" or similar that can be used for this purpose?</p>
  
  <pre><code>$.ajax({
      url: 'document.xml',
      type: 'GET',
      dataType: 'xml',
      timeout: 1000,
      error: function(){
          alert('Error loading XML document');
      },
      success: function(xml){
          // do something with xml
      }
  });
  </code></pre>
  
  <p>The use case is that I want to feed the xml to flash plugin and for that I need the actual XML as a string.</p>