I have a table like this:
<table class=firstclass>
<tr>
<td><a href....></a></td>
</tr>
<tr>
<td><a href....></a></td>
</tr>
<tr>
<td><a href....></a></td>
</tr>
doc.select("td.firstclass > a[href]");
Element table = doc.select("table.firstclass").first(); //gets a table with the class "first class"
Elements links = table.select("a[href]");
for (Element link : links) {
String textlink= link.text();
String urllink= link.attr("abs:href");
));
}
// ...
Using "td.firstclass" is implying that your TD will have the class "firstclass".. which is why you get 0 results
You should do something like..
Document doc = ....; //however you get your document
Element table = doc.select("table.firstclass").first(); //gets a table with the class "first class"
Elements links = table.select("a[href]");
And from there you can process your links however you want