Say I have something like the following:
<table>
<tbody>
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
<tr><td>5</td></tr>
<tr><td>6</td></tr>
<tr><td>7</td></tr>
<tr><td>8</td></tr>
<tr><td>9</td></tr>
<tr><td>10</td></tr>
<tr><td>11</td></tr>
<tr><td>12</td></tr>
<tr><td>13</td></tr>
<tr><td>14</td></tr>
</tbody>
</table>
I want to be able to select every fourth tr element starting with row 3.
The closest I have gotten to this is:
//tbody/tr[position() mod 4 = 1 and position() > 1]
But this starts from the first row.
All you need to do is //tbody/tr[position() mod 4 = 3]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With