Given an XML structure like so:
<table>
<thead>
<tr>
<th><div data-col="0">First Name</div></th>
<th><div data-col="1">Last Name</div></th>
<th><div data-col="2">Age</div></th>
<th><div data-col="3">Id</div></th>
<th><div data-col="4">City</div></th>
</tr>
</thead>
<tbody>
<tr data-row="0">
<td data-col="0"><div>Ivan</div></td>
<td data-col="1"><div>Ivanov</div></td>
<td data-col="2"><div>35</div></td>
<td data-col="3"><div>EFF-12218</div></td>
<td data-col="4"><div>London</div></td>
</tr>
</tbody>
</table>
- How could I get the value of
data-col
(wheretext = 'id'
), for the first element? - How could I get the value of text in this cell
(
'EFF-12218'
) using found value ofdata-col
?