Refactored and improved xml_name method in Exchange