reading xml by tag and writing
<p>reading xml by tag in a foreach loop 
example xml:</p>

<pre><code>&lt;users&gt;
 &lt;user&gt;
  &lt;id&gt;12345567&lt;/id&gt; 
  &lt;name&gt;Ronsna Stedinberg&lt;/name&gt; 
 &lt;/user&gt;
 &lt;user&gt;
  &lt;id&gt;12345568&lt;/id&gt; 
  &lt;name&gt;Sonsna Dtedinberg&lt;/name&gt; 
 &lt;/user&gt;  
&lt;/users&gt;
</code></pre>

<p>now i would like to save a  tag to a new file with all its sub tags</p>
