format XML code