how to write into existing xml file using php
<p>Hi every one
I have an XML file, it's contain same tags like this:</p>

<pre><code>&lt;data&gt;
&lt;info&gt;&lt;detail&gt;first data&lt;/detail&gt;&lt;/info&gt;
&lt;info&gt;&lt;detail&gt;second data&lt;/detail&gt;&lt;/info&gt;
&lt;info&gt;&lt;detail&gt;third data&lt;/detail&gt;&lt;/info&gt;
....
&lt;/data&gt;
</code></pre>

<p>I want to add this:</p>

<pre><code>&lt;info&gt;&lt;detail&gt;fourth data&lt;/detail&gt;&lt;/info&gt;
</code></pre>

<p>to my file.</p>

<p>and thanks for any help.</p>
