Martin v. Löwis wrote: > A common problem is to save the data in the same encoding that they > original had; this is what an editor typically does (you may know > Edward Ream for writing editors). XML parsers are notoriously bad > in supporting editors. There are too many lexical details that may > need to be preserved (such as the order of the attributes, and the > spaces inside the opening tag) to make it impractical to report all > that to the application.
an editor designed to work on the XML serialization level shouldn't use a traditional XML parser at all, of course. definitely not SAX or DOM, or any other infoset-or-higher-level API. on the other hand, an editor that just happens to use XML as a serialization format might as well decide on a model representation and an encoding and stick to it. being tolerant in what it accepts is a good idea, of course, but being consistent in what it generates is an even better idea. </F> -- http://mail.python.org/mailman/listinfo/python-list