[lxml-dev] iterparse and namespaces
Piotr Furman
piotr.furman at webservice.pl
Tue Mar 17 17:03:28 CET 2009
Stefan Behnel <stefan_ml <at> behnel.de> writes:
> Note that this would not give you a namespace-free tag name on the
> element, so you'd still have to use qualified names in a couple of places.
> It's really best to assign the qualified names to variables and to work
> with those.
>
> Stefan
Agree, something like
ns = "http://www.example.com"
etree.iterparse(xml, tag="{%s}a" % ns)
will be probably best way. Thanks for answers.
More information about the lxml-dev
mailing list