last time I did anything to do with coding for XML I ended up using c#. It has some nice libraries for dealing with XML.

easiest output would just be to a CSV file, easy to append to and openable...