shahin
Active Member
Hi there all!! Hope you are doing well. Could anybody tell me what will be the xpath to get the NAME which is "C15 Espresso" from the element I've pasted below?
Btw, I've already tried with these but no result:
1. //div[@class="body left"]/a[@class=listing-name]/text()
2. //a[@class="listing-name"]/text()
3. //div[@class="body left"]/a[@class="listing-name"]/@title
4. //a[@class="listing-name"]/@title
Code:
<div class="body left">
<a class="listing-name" href="/wa/hammond-park/c15-espresso-1000001714962-listing.html?referredBy=www.yellowpages.com.au&context=businessTypeSearch" title="View more about this business">C15 Espresso</a>
<p class="listing-heading"><a href="/find/cafes/hammond-park-wa" data-index-link="true">Cafes - Hammond Park, WA</a></p>
<p class="listing-short-description">Quality Food At Every Time</p>
</div>
Btw, I've already tried with these but no result:
1. //div[@class="body left"]/a[@class=listing-name]/text()
2. //a[@class="listing-name"]/text()
3. //div[@class="body left"]/a[@class="listing-name"]/@title
4. //a[@class="listing-name"]/@title