• Very useful question, thanks. I learnt something about xml parsing and also optimization so far today :). Thanks for all the comments.

    I would also like to defend the question. I think seeing unconventional ways of solving a problem are always helpful. When the task is to review existing code, it is helpful to know what is working (although not optimal).

    Cheers