[lxml-dev] iterparse and namespaces

Piotr Furman piotr.furman at webservice.pl
Tue Mar 17 15:59:54 CET 2009


 <jholg <at> gmx.de> writes:
> Is there a usecase for "give me every element x from whatever namespace"?
> 
> Holger

Thanks for answer, my use case is that I have a xml file with only one namespace
defined in root. I guess that if there were more namespaces in one file it
wouldn't make sense, but as long as it's only one I just don't care about that
and would have all specified elements.

So I have at least two choices, either remove xmlns from files, or iterate over
all elements and filter out those I don't need.

PF



More information about the lxml-dev mailing list