[SMA-2] Add support for generating a report in XML

The HTML reports, while great for human consumption, do not lend
themselves to subsequent computerised processing. This commit adds
support for producing an XML report that lends itself to further
processing using XPath, XSLT, etc.