title: PHP XML-Export as file download
body: <p>i have written a script that prints a XML file to the screen but I want it to open a download dialog so that i could save it as a file.</p>
  
  <p>how could i do that?</p>
  
  <p>thnx!</p>
  
  <p>the script:</p>
  
  <pre><code>&lt;?php
  print '&lt;?xml version="1.0" encoding="UTF-8" ?&gt;';
  print "\n &lt;data&gt;";
  ...
  print "\n &lt;/data&gt;";
  ?&gt;
  </code></pre>