how to parse nested table usin jsoup -
how can extract "tr" tags has directly 2 "td" tags using jsoup.
sample html
<table> <tr> <!-- don't want extract tr --> <td> <table> <tr><td>extract</td><td>extract</td></tr> <!-- want extact tr --> <tr><td>extract</td><td>extract</td></tr> <!-- want extact tr --> </table> </td> </tr> </table>
i tried extract using query. had got 3 tr tags.
doc.select("tr:has(td:eq(1))")
have tried following query doc.select("tr tr")
?
this query should select table rows commented.
Comments
Post a Comment