Tricks for Writing XML with Python 3