[Zope3-dev] XPATH in zope.testbrowser,
assertions in zope.testrecorder
Martijn Faassen
faassen at infrae.com
Mon Jun 26 05:57:23 EDT 2006
Benji York wrote:
> Martin Aspeli wrote:
>> o In zope.testbrowser, [snip] having the ability to select nodes
> > by XPATH would be incredibly useful
>
> Yep, I and others have thought the same thing.
>
>> I imagine an existing
>> library would be available to make this reasonably easy to implement?
>
> With ElementTree going into Python 2.5, I suspect testbrowser will grow
> XPath support.
ElementTree does not contain XPath support. It has an expression syntax
in .find() that it claims is a (small) subset of XPath, but really it
isn't quite. I believe there's also a partial XPath implementation for
ElementTree somewhere though, though due to limitations of ElementTree
(no parent references) a full XPath implementation is not currently
possible.
Still, ElementTree .find() path support would be useful.
lxml of course offers both .find() and a full-fledged XPath
implementation. :)
Regards,
Martijn
More information about the Zope3-dev
mailing list