Clean up the collection method for XML