Format xml file