[lxml-dev] find/findall not accepting qnames?
John Krukoff
jkrukoff at ltgc.com
Fri Dec 1 02:50:06 CET 2006
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 haven't tested with earlier revisions, but after tracking down a
couple of bugs related to this, is this a change in behavior in recent
(1.1) lxml versions?
--
John Krukoff <jkrukoff at ltgc.com>
Land Title Guarantee Company
More information about the lxml-dev
mailing list