write pretty xml