title: Remove the Parent tag in xml using php
body: <p>I am facing a problem in editing a xml file. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
    &lt;urlset&gt;
  
    &lt;url&gt;
     &lt;loc&gt;http://www.abc.com/&lt;/loc&gt;
     &lt;lastmod&gt;2010-04-17T17:23:57+00:00&lt;/lastmod&gt;
     &lt;changefreq&gt;daily&lt;/changefreq&gt;
     &lt;priority&gt;0.50&lt;/priority&gt;
    &lt;/url&gt;
    &lt;url&gt;
     &lt;loc&gt;http://www.abc.com/&lt;/loc&gt;
     &lt;lastmod&gt;2010-04-17T17:23:57+00:00&lt;/lastmod&gt;
     &lt;changefreq&gt;daily&lt;/changefreq&gt;
     &lt;priority&gt;0.50&lt;/priority&gt;
    &lt;/url&gt;
  
  &lt;/urlset&gt;
  </code></pre>
  
  <p>I want to add one more set of records starting with <code>&lt;url&gt;</code> with its other tags, (i.e) "loc,lastmod,changefreq,priority" and than save the xml file.For adding the new record i need to remove the parent closing tag that is <code>&lt;/urlset&gt;</code> and than add the rest of the records and close the main tag.<br>
  Can anyone please help me solving my problem.Thanks</p>