I am trying to insert data into xml file. For Ex:
<list>
<activity>swimming</activity>
<activity>running</activity>
</list>
In place of swimming i want to insert different data(ex:jogging) How can i do that?
Use a PHP XML library, such as http://php.net/manual/en/book.simplexml.php . Unfortunately, when you're modifying an XML document with a simple interface, you often have to regenerate the document. If you use a stream-based processor you may be able to avoid this.
editbutton near bottom left corner of the question - use it to update your existing questions instead of posting a new one. Select your code and hit ctrl-k for formatting it. more formatting tips