XML with PHP 4.3" inserting child nodes to XML file

Hi i need some help inserting child elements to existing xml file from a html form using php my xml file looks like this

<mother>
<child attribute = abcd />
<child2> data </child2>
<child3> data </child3>
<child4> data </child4>

   &lt;child attribute = abcd /&gt;
   &lt;child2&gt; data &lt;/child2&gt;
   &lt;child3&gt; data &lt;/child3&gt;
   &lt;child4&gt; data &lt;/child4&gt;

</mother>

now i want to be able to insert another set of <child attrbute = abcd /> etc… before the </mother> tag into my xml file from a html form with php scripting unfortunately my server does not support php 5 DOM functions.

kindly help