[lxml-dev] find/findall not accepting qnames?

Fredrik Lundh fredrik at pythonware.com
Fri Dec 1 08:29:41 CET 2006


John Krukoff wrote:

> I find it surprising that find & findall do not accept QName objects in
> lxml, and instead require a manual cast to string, like so:
> 
> etree.XML( '<a><ns0:b
> xmlns:ns0="http://test"/></a>' ).find( str( etree.QName( 'http://test',
> 'b' ) ) )
> 
> ElementTree appears to accept QNames transparently, in my limited
> testing.

I find it surprising that it does, though.  Not sure that's intentional ;-)

</F>



More information about the lxml-dev mailing list