[lxml-dev] xpath comparison

Stefan Behnel stefan_ml at behnel.de
Fri Jun 6 11:08:17 CEST 2008


Olivier Collioud wrote:
> is there any xpath equivalent in lxml to this:
> 
> (ms:string-compare(@START,$symbol)=-1 and
> ms:string-compare(@END,$symbol)=1)
> 
> which mean:
> 
> (START < symbol and symbol < END)

You can implement your own python function to do this.

http://codespeak.net/lxml/extensions.html

Stefan



More information about the lxml-dev mailing list