2012-03-07 120 views

回答

18

區分大小寫:

//a[contains(@href,'logout.aspx')] 

不區分大小寫的XPath 2.0中:

//a[contains(lower-case(@href),'logout.aspx')] 

不區分大小寫的XPath 1.0中:

//a[contains(translate(@href, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),'logout.aspx')] 
+1

這是誰?哪個xpath提供程序使用? – 2012-03-07 15:47:39

+0

試試這裏:http://www.bit-101.com/xpath/ - 它不會選擇一個標籤。 – 2012-03-07 15:54:10

+0

bit-101.com/xpath是2006年以來的老工具。使用http://xpath.online-toolz.com/tools/xpath-editor.php – 2012-03-07 16:02:07

相關問題