Fixing the XML batteries

Stefan Behnel stefan_ml at behnel.de
Tue Dec 13 15:21:46 EST 2011


rurpy at yahoo.com, 13.12.2011 20:37:
> On Dec 13, 5:32 am, Stefan Behnel wrote:
>> In Python 2.7/3.2, ElementTree has support for C14N serialisation, just
>> pass the option method="c14n".
>
> Where does one find information in the Python documentation about
> this?

Hmm, interesting. I though it had, but now when I click on the stdlib doc 
link to read the module source (hint, hint), I can see that it only has the 
hooks. The C14N support module of ET 1.3 was not integrated into the 
stdlib. Sorry for not verifying this earlier.

So you actually need the external package for C14N support. See here:

http://effbot.org/zone/elementtree-13-intro.htm

http://hg.effbot.org/et-2009-provolone/src/tip/elementtree/elementtree/ElementC14N.py

Just to emphasize this once again: it's not more than a single module that 
you can copy into your own code as a fallback import, or deploy in your 
local installations.

Stefan




More information about the Python-list mailing list