[lxml-dev] Bug in XPath evaluation - not a bug :)
Martijn Faassen
faassen at startifact.com
Tue Apr 24 14:50:01 CEST 2007
Hey,
On 4/24/07, Stefan Behnel <stefan_ml at behnel.de> wrote:
> just a quick note here.
>
> Martijn Faassen wrote:
> > full qualified names would not be XPath compatible. Occasionally we've
> > had some discussions about offering an API to do XPath queries using
> > Clarke notation.
>
> >>> from lxml import etree
> >>> root = etree.Element("{testns}root")
> >>> etree.SubElement(root, "{testns}test")
> <Element {testns}test at b7da3464>
>
> >>> find = ETXPath("{testns}test")
> >>> find(root)
> [<Element {testns}test at b7da3464>]
>
> I guess that's actually still missing from the docs - it's been in there for a
> while...
Yeah. I remember discussions on this, but I didn't remember it getting
implemented. Cool!
The docs still need tender loving care from a dedicated volunteer, and
that shouldn't be you. Nobody can give the excuse that they don't know
Pyrex here either, so we should have masses of volunteers standing up
to contribute. :)
Regards,
Martijn
More information about the lxml-dev
mailing list