Remove namespace declaration from ElementTree in lxml

Zero Piraeus schesis at gmail.com
Thu Dec 27 21:32:33 EST 2007


:

I want to remove an unused namespace declaration from the root element
of an ElementTree in lxml.

There doesn't seem to be any documented way to do this, so at the
moment I'm reduced to sticking the output through str.replace() ...
which is somewhat inelegant.

Is there a better way?

 -[]z.



More information about the Python-list mailing list