PDA

View Full Version : Updating xml data online


troy-slade
08-02-2010, 05:31 PM
Hi, I have flash website that is using xml data to dynamically load the text. Now the next step is to update the xml data easily. I hoping to be able to create an online form (thinking php for this) which can post the current xml data into it and then update any changes made. Would anyone know of the best way to tackle something like this. Any examples or tutorials that you could point me in the right direction would be greatly appreciated. Cheers.

snowedin
08-02-2010, 05:52 PM
It's quite easy to do that using simplexml + a web form in php or maybe DOM.
There is are some big differences in this area between php4 and php5.
Use php5 if you can and just google it.

sneakyimp
08-02-2010, 09:06 PM
If you are loading XML from the server, perhaps you can just use Actionscript's XML-handling functionality to make the changes in Actionscript and then just post back the modified XML in its entirety to a PHP script which would just store the XML to a file.

NOTE: This may open up your system to abuse if your server doesn't try to validate the XML data.

If you are ready to do a bunch of xml parsing, both AS3 and PHP have xml parsing functionality:
http://us2.php.net/xml
You would need to check of your hosting provider has installed the XML extension in PHP.