title: How can I make a Xml output to file?
body: <p>I have a xml output. I convert an array to xml. But how can I convert this output as a file? I need to store this file my storage folder because I want to download it when it is necessary. So imagine something like that:</p>
  
  <ol>
  <li><p>Given we have a table</p></li>
  <li><p>Then we convert table datas to xml.</p></li>
  <li><p>Then it should store as an xml file</p></li>
  <li><p>When we hit a button</p></li>
  <li><p>It should download as a xml file.</p></li>
  </ol>
  
  <p>I need last 3 steps to get it work. Many thanks..</p>