Add function to re-format xml files