I'm currently using CsQuery which is similar to HtmlAgilityPack, it allows you manipulate a virtual dom as .net objects. I'm currently trying to iterate through a html table so that I can build a datatable from it, however the cells are mixed whether they're nested in divs or anchor tags so it's not always the same selector. Is there a css selector I can use that will find the lowest level child element?
Here's an example of a table I am trying to select from.
<table>
<tr>
<th>TestCol1</th>
<th>TestCol2</th>
<th>TestCol3</th>
</tr>
<tr>
<td><div><a>41</a></div></td>
<td><div>Testttttt</div></td>
<td>Testestst</td>
</tr>
</table>
If I was to use the selectr 'tr td div a', I miss row 2 and 3. At the moment I am having to use if statements to try all three selector variations. In an ideal row I would use the selector and it would extract the inner text for every td.
If anything didn't make sense, please let me know and I will reiterate.