XPath text() expression that contains a new line -


let's have following html code:

<a href="/site/somesite/">                           somesite</a> 

my question how can write xpath expression must use text() property match somesite link , cannot change source?

i'm not sure whether want lookup url based on link text, or link text based on url. url:

//a[normalize-space() = 'somesite']/@href 

this text:

normalize-space(//a[@href = '/site/somesite/']) 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -