Inserting a XML node at a specific location
Posted: Wed Jun 16, 2010 9:16 am
Hi Guys,
I want to insert a node with children at a specific location in the XML file. How do I do it?
For eg. If I have an XML like:
I want to insert:
between <image name="img01"> & <image name="img02">. How do I do this? I am using SimpleXML right now to read the XML.
Thanks.
I want to insert a node with children at a specific location in the XML file. How do I do it?
For eg. If I have an XML like:
Code: Select all
<myvalues>
<image name="img01">
<src>test</src>
</image>
<image name="img02">
<src>test</src>
</image>
<image name="img03">
<src>test</src>
</image>
</myvalues>Code: Select all
<image name="img11">
<src>test</src>
</image>Thanks.