XML formatter using Python