xmlwitch has two classes: Builder and Element.
Builder takes three parameters:
encoding, which is required and defaulted to UTF-8;
version, whose optional presence adds a <?xml?> processing instruction at the top of the document;
indent, which determines the white-space string used to indent the document tree (defaulted to two spaces).
xmlwitch currently only generates human-readable XML documents, with linebreaks and indentation.
Namespaced elements can be created by using square brackets.
It is a minimalist implementation, written in less than 100 lines of code.
· Python 2.5 or higher