add function to generate XML summary