XPath: How do you do a lowercase call in xpath

后端 未结 2 1618
[愿得一人]
[愿得一人] 2020-12-17 08:55

I\'m using Firefox\'s XPath-checker and can\'t get the syntax right. I have a link:

LinkName

and I try doing:

         


        
2条回答
  •  既然无缘
    2020-12-17 09:40

    There is no function called lower-case in XPath 1.0 which is the version of XPath used in Firefox.

    You need to use the ugly translate function instead:-

      translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')
    

    ...but of course you would need to extend this if you need coverage of a wider character-set.

提交回复
热议问题