I am creating an iOS app that reads data from an xml file. One of the fields in the xml file is time. If the current time is later than the time in the xml file, that entry needs to be deleted from the xml and thus no longer displayed on the iPhone. I was hoping to check the xml file every 15 minutes or so and rewrite it if I need to. What technology should I use to do this (php? javascript?)? How can it be done in code? Anything else I should know about?
I’m thinking that I don’t need to do anything in the iPhone app code. Rather just make a php script on the webserver that executes periodically, if that’s possible.
Thanks,
You can use pretty much any language you like (My personal preference would be to use Perl as I like it and know its XML libraries).
The program just needs to read the XML file, parse it, delete the nodes that no longer apply, then serialise it back to XML and overwrite the file.
You then just need to run the program on a schedule. Cron is the standard way to do this on UNIX-like systems. Windows Task Schedular is for Windows (as far as I know).
I’d probably use a database to store the data, and generate the XML from that instead of having a single file that gets overwritten though.