Enable printing to XML with existing code