Here is my html contents that I am trying to parse with XPath
<td class="text1">Content</td>
<td class="text2">Content</td>
<td class="text2">Content</td>
I want to select the td elements using the class attribute but as obvious, the value for this attribute is different for each element.I have tried:
//td[starts-with(@class,'text')]
but this approach is not working.What could be the correct way?
You can use "contains":
//td[contains(@class, 'text')]
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