title: Create PHP DOM xml file and create a save file link/prompt without writing the file to the server when headers already sent
body: <p>I've created a PHP DOM xml piece and saved it to a string like this:</p>
  
  <pre><code>&lt;?php
    // create a new XML document 
    $doc = new DomDocument('1.0');
    ...  
    ...
    ...
    $xmldata = $doc-&gt;saveXML();
  ?&gt;
  </code></pre>
  
  <p>Now I can't use the headers to send a file download prompt and I can't write the file to the server, or rather I don't want the file laying around on it.</p>
  
  <p>Something like a save this file link or a download prompt would be good. How do I do it?</p>