I just uploaded streamxmlwriter 0.2 to PyPI.
Streamxmlwriter is my library for flexible size-independent XML writing, including pretty-printing and custom attribute sorting. Try it out (both
easy_install streamxmlwriter and
pip install streamxmlwriter should work) or dig through the source code on GitHub.
Namespace support is still experimental, and the documentation is a bit on the thin side, but you should be able to use it for Real Work. (I do.)
I'll show it off in a post of its own when it's a bit more mature.