[lxml-dev] Bug in XPath evaluation - not a bug :)
Stefan Behnel
stefan_ml at behnel.de
Tue Apr 24 08:20:37 CEST 2007
Hi Martijn,
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...
Stefan
More information about the lxml-dev
mailing list