I am a completly noob on XPath, I am doing application to fetch data from a website, and I need to find 2 things:
1- all the span tags that start with: ctl00_Main_GridView_lieutenants
2- the href of the parent tag on the span.... errr.. I will try to explain:
<a href="something.html"><span id="ctl00_Main_GridView_lieutenants_ctl03_lbl_nick">Text</span></a>
I need the Text and the link ;)
//span[starts-with(@id, 'ctl00_Main_GridView_lieutenants')]
Selects all span which @id
starts with ctl00_Main_GridView_lieutenants
//a[span[starts-with(@id, 'ctl00_Main_GridView_lieutenants')]]/@href
Selects all @href
of a
which have child span
which @id
starts with ctl00_Main_GridView_lieutenants
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With