XML reformatting