How to ask sax for the file encoding
Irmen de Jong
irmen.NOSPAM at xs4all.nl
Wed Oct 4 23:06:45 CEST 2006
Edward K. Ream wrote:
>> Please consider adding some elements to the document itself that
> describe the desired output format,
> Well, that's what the encoding field in the xml line was supposed to do.
As others have tried to explain, the encoding in the xml header is
not part of the document data itself, it says something about the data.
It would be a bad design decision imo to rely on this meta information
if you really meant that information to be part of the data document.
> Not a bad idea though, except it changes the file format, and I would really
> rather not do that.
XML allows you to easily skip any elements that you think you don't need.
More information about the Python-list