My xpath: /html/body/div/table/tbody/tr[2]/td[4]
I need to get CSS to use it in the jsoup selector.
I found a comparison between xpath and css: here , and he said in his example ( Second <E> element anywhere on page ) that I cannot do this. Xpath xpath=(//E)[2] CSS N\A
Perhaps I cannot find what I am looking for. Any ideas?
Here's the html I'm trying to parse (I need to get the values: 1 and 3 ):
<div class=tablecont> <table width=100%> <tr> <td class=header align=center>Panel Color</td> <td class=header align=center>Locked</td> <td class=header align=center>Unqualified</td> <td class=header align=center>Qualified</td> <td class=header align=center>Finished</td> <td class=header align=center>TOTAL</td> </tr> <tr> <td align=center> <div class=packagecode>ONE</div> <div> <div class=packagecolor style=background-color:#FC0;></div> </div> </td> <td align=center>0</td> <td align=center>0</td> <td align=center>1</td> <td align=center>12</td> <td align=center class=rowhead>53</td> </tr> <tr> <td align=center> <div class=packagecode>two</div> <div> <div class=packagecolor style=background-color:#C3F;></div> </div> </td> <td align=center>0</td> <td align=center>0</td> <td align=center>3</td> <td align=center>42</td> <td align=center class=rowhead>26</td> </tr> </table> </div>
Kamil source share