Great xml formatting function