This ASP.NET web application stores a local copy of the Cumbria A-Z data file (as it is fairly large), along with a note of its date in a separate file.
At every request, it checks the date of the real Cumbria A-Z data file - by issuing a HTTP HEAD request. If the local file is out of date, the web app reads the entire real data file, storing it as a local copy - and updates the date file. (If the data read fails, the local copy has not been changed.)
The code reads the local A-Z file and parses its XML. For XML items that have locations, it adds to the JavaScript that is used by the page code to define the Google Maps points. The app remembers this JavaScript as long as the application 'stays alive' so that it does not have to re-parse the A-Z file.
Page generated: 04 February 2012 02:36:43
Application started: 04 February 2012 02:36:42