Almost done with XML output formatting