ElementTree: namespace declaration in each element?

cyberco cyberco at gmail.com
Sun Nov 19 15:01:22 EST 2006


> written by a "it's the bytes, not the data" guy, obviously ;-)

hehehe...I figured it was. Wonder 'who' it was... ;)

> the standard serializer in 1.2 doesn't support default namespaces, so
> the quickest way to do this is to loop over all tags (use getiterator),
> strip off the "{http://xspf.org/ns/0/}" prefix, add an xmlns attribute
> to the root (if necessary), and write it out.

OK, that's what I was already doing. Thanks.
Will the standard serializer in 1.3 support default namespaces?




More information about the Python-list mailing list