Add function for XML output