christo16 Posted October 28, 2007 Share Posted October 28, 2007 Hello All, I have an xml file that I use to store information in. I want to be able to add info to it without deleting whats in the file. Thank you! Link to comment https://forums.phpfreaks.com/topic/75150-editing-an-xml-file/ Share on other sites More sharing options...
sford999 Posted October 29, 2007 Share Posted October 29, 2007 I think fopen & fwrite is what you`re looking for. Link to comment https://forums.phpfreaks.com/topic/75150-editing-an-xml-file/#findComment-380104 Share on other sites More sharing options...
christo16 Posted October 29, 2007 Author Share Posted October 29, 2007 Thank you for the help, Will I be able to use fopen/fwrite to insert some xml above the bottom element? Example: Heres my xml: <movielist> <movie name="Movie 1"> <id>0</id> <title>Movie 1</title> </movie> I want to insert new text here </movielist> Thank you for any help! Link to comment https://forums.phpfreaks.com/topic/75150-editing-an-xml-file/#findComment-380144 Share on other sites More sharing options...
sford999 Posted October 29, 2007 Share Posted October 29, 2007 You can edit it via a form using the following functions http://uk2.php.net/file_get_contents http://uk2.php.net/manual/en/function.file-put-contents.php Link to comment https://forums.phpfreaks.com/topic/75150-editing-an-xml-file/#findComment-380183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.