title: Xml add element node using PHP
body: <p>I would like to add an element node in my XML file using PHP. I can not get it right when I add it below root.
  Please show me some clean code so that I understand how it works. Thank you!
  My xml is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;GameStore&gt;
  
      &lt;Game type="adventure"&gt;
      &lt;TITLE&gt;Assassin's Creed: Brotherhood&lt;/TITLE&gt;
      &lt;PUBLISHER&gt;Ubisoft&lt;/PUBLISHER&gt;
      &lt;/Game&gt; 
  
      &lt;Game type="adventure"&gt;
      &lt;TITLE&gt;Batman: Arkham Asylum&lt;/TITLE&gt;
      &lt;PUBLISHER&gt;Eidos&lt;/PUBLISHER&gt;
      &lt;/Game&gt;
  
      &lt;/GameStore&gt;
  </code></pre>