lxml.etree, namespaces and element insertion

Neil Cerutti neilc at norwich.edu
Thu Jan 27 16:06:49 EST 2011


On 2011-01-27, hein <iwanttogetspammed at gmx.net> wrote:
>  - How am i supposed to detect a missing namespace, if there
>  are no differences in the serialized representation? (That's
>  what i initially used to debug the problem.)

lxml's pretty printer is at fault, as it emits unprefixed names
whenever possible while serializing. For debugging, try using
.dump instead. Hopefully that makes the error obvious.

-- 
Neil Cerutti



More information about the Python-list mailing list