skip to Main Content

Php XML remove the parent node which has child nodes in existing file

I'm trying to remove the parentnode itself from existing xml file XMLfile1.xml <?xml version="1.0"?> <rss> <channel> <title>Main Website</title> <link>siteurl</link> <item> <item_type>Product</item_type> <title>abcd</title> <sku>TESTsku</sku> <id>919031</id> <short_description><![CDATA[]]></short_description> <description><![CDATA[]]></description> <link>siteurl</link> <availability>Out of Stock</availability> <price>21.81 CAD</price> <sale_price>21.81 CAD</sale_price> <categories> <category/> </categories> <attributes> </item> </channel>…

VIEW QUESTION
Back To Top
Search