choose a> tag with given inner text with htmlagilitypack

.net html-agility-pack xpath

Question

I must decide on a tag that includes the innertext I define. I need assistance with the xpath query in IE.<a href="#">wake up</a> . Therefore, if I pass wake to the xpath, it ought to choose this link.

thanks

1
4
1/2/2012 12:40:28 PM

Accepted Answer

The XPath is just//a[starts-with(., 'wake')] .

9
1/2/2012 12:48:52 PM

Popular Answer

One approach (case-sensitivity applies):

//a[contains(text(), 'wake')]


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow