Furthermore, if I use the "html" method (an option given to ElementTree.write), closing tags are converted to lower case, which leads to an XML parsing error with camel-cased tag names. Using the "text" method instead removes all tags, and I get a ValueError if I try to use the "c14n" method.
This seems like a limitation in ElementTree.py only, as _elementtree.c doesn't appear to contain any of these serialization or writing methods. What I think I'll do is write a _serialise_svg function and add it to the _serialize dictionary of function lookups, from the module I'm working on. That way I hope I can pass method="svg" to ElementTree's write() method; it should work, and it should also be backwards-compatible. That should be quite a quick and easy fix actually. Would this be something worth incorporating into ElementTree downstream? Kind regards, Alex _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com