title: Create new XML file and write data to it?
body: <p>I need to create a new XML file and write that to my server. So, I am looking for the best way to create a new XML file, write some base nodes to it, save it. Then open it again and write more data.</p>
  
  <p>I have been using <code>file_put_contents()</code> to save the file. But, to create a new one and write some base nodes I am not sure of the best method.</p>
  
  <p>Ideas?</p>