php code to insert data into xml file
I am trying to insert data into xml file. For Ex:
<list>
<activity>swimming</activity>
<acti开发者_运维百科vity>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.
精彩评论