title: Adding in new XML root node
body: <p>I need to add in a new root node to the following XML</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;unit&gt;
  &lt;source&gt; 
  &lt;id&gt;ANCH02&lt;/id&gt; 
  &lt;uri&gt;http://www.hamiltonisland.biz/tabid/339/Default.aspx&lt;/uri&gt; 
  &lt;/source&gt;
  &lt;/unit&gt;
  </code></pre>
  
  <p>to become</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
          &lt;units&gt;
          &lt;unit&gt;
          &lt;source&gt; 
          &lt;id&gt;ANCH02&lt;/id&gt; 
          &lt;uri&gt;http://www.hamiltonisland.biz/tabid/339/Default.aspx&lt;/uri&gt; 
          &lt;/source&gt;
          &lt;/unit&gt;
          &lt;/units&gt;
  </code></pre>
  
  <p>How could I do this? It doesn't seem like SimpleXMLElement has this functionality. I have also looked at this DomNode example <a href="http://php.net/manual/en/domnode.insertbefore.php" rel="nofollow">http://php.net/manual/en/domnode.insertbefore.php</a> but it doesnt seem to be able to add in a new root node.</p>