I am trying to query html data using YQL.
I wanted to know how to perform query of a html node based on class attribute when the node has multiple classes, e.g:
<tr class='class1 class2'></tr>
This query works fine:
select * from html where url="http://soccernet.espn.go.com/scores" and
xpath='//tr[@class="class1"]'
But when I try querying for class2, I’ve got empty result:
select * from html where url="http://soccernet.espn.go.com/scores" and
xpath='//tr[@class="class2"]'
So basically I want to know how to query html nodes using YQL when the node has multiple class attribute.
There may be a better way – but this is how I tackle this problem when I come across it: