Stefan, > > writer = codecs.lookup(encoding)[3](writer, "xmlcharrefreplace") > > Could be done, yes. ElementTree and lxml do it that way. It's not required, > though. If you say you want to serialise plain ASCII data, nothing keeps an > XML serialiser from shouting at you when it finds non-ASCII data. Same for > latin1 data or kyrillic data, or ...
I'm not sure what you're saying. The "encoding" parameter is about the character set encoding of the XML output file; it has little or nothing to do with the input data, which in my case is all unicode strings. Clearly, with XML, one can use ASCII, for instance, as a character set encoding. Why not make this parameter work? Bill _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig