Parsing XML in C++ the wrong way

I was approached by the IT-guy from the local ski-resort where I live and asked if I could integrate weather readings from the Norwegian Public Roads Administration. They have many sites where they collect temperature, dew-point, snow-depth, wind etc. And one is conveniently placed just across the road 100 meters away. It sends data every 10 minutes.

The data could be downloaded using curl so it was very simple to get it. Curl is written in C, and Jean-Philippe Barrette-LaPierre have written a nice C++ wrapper.

The weather data is in XML and I first thought of using RapidXML or LixXML2 but since I only needed weather data from one location I ended up with a very basic search-string that uniquely identifies the beginning and end of the XML-data from that particular weather station. That is not very bulletproof if the id changes, some fields are moved around or other changes to the data.

When I first get the site I then get the temperature, wind, snow-depth etc. and parse it into a double. This is then inserted into a postgresql-database. Every 10 minutes a cronjob then download the latest entries from the database and save it to a text-file. The text-file is then downloaded and parsed using the javascript-graph-utility Dygraph and the weather data can be seen at Breimsbygda Skisenter albeit 10-20 minutes delayed.