Re: "encoding" argument to xml.dom.minidom.toxml()?
Bill Janssen <[email protected]> Tue, 10 Jun 2008 13:59:06 PDT
| Newsgroups | gmane.comp.python.xml |
|---|---|
| Message-ID | <08Jun10.135914pdt."58698"@synergy1.parc.xerox.com> |
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 - [email protected] http://mail.python.org/mailman/listinfo/xml-sig