web scraping - Xpath - Exclude elements within TD -


i'm trying use chrome's scraper extension using xpath. i've been able scrape need table, i'm stuck in 1 spot. here's source

<td> <p class="pclass">     <a href="theurl" target="_blank">         <i class="iclass">sometext</i>     anchor text     </a> </p> </td> 

i'm trying grab url, when using xpath code td[9]/p/a grabs icon part says "sometext". there way grab url?

in order extract url add @href xpath expression, should work: //td[9]/p/a/@href. stripping white space can use xpath function normalize-space().


Comments