PDA

View Full Version : Editting XML Files with PHP


Zipp425
09-11-2006, 08:16 AM
Ive been working on a way to edit an xml file, I have been using fopen and just specifying a specific line to replace, but that wasnt working very well, because sometimes lines seemed to be off, or users would give data that would cause line breaks.

I just recently learned about SimpleXML in PHP5, and I was wondering if someone could explain to me how I could use PHP to open a XML file, and select a specific tag name and replace a specific attribute, or a array of attributes.

I would be using xmlHttpRequest to pass data to the PHP file that would then open and edit the XML file.

Thanks for your help in advance

ttttt
09-30-2006, 07:14 PM
Try this:
http://www.onlamp.com/pub/a/php/2004/01/15/simplexml.html