L
L
lcd12322016-08-06 19:56:51
Python
lcd1232, 2016-08-06 19:56:51

How to find all elements greater than 1 in Xpath?

There is an html code like this.

<table class="DataGrid" cellspacing="0" rules="all" border="1" id="RealDataGrid" style="width:100%;border-collapse:collapse;">
  <tbody>
    <tr>
      <td class="GridColumnTitle">Role</td>
      <td class="GridColumnTitleNumeric">Percent</td>
      <td class="GridColumnTitle">Name</td>
      <td class="GridColumnTitle">Address</td>
    </tr>
    <tr>
      <td class="GridField">Taxpayer</td>
      <td class="GridFieldNumeric">100</td>
      <td class="GridField">TURNER CARA F &amp; TURNER ASHLEY C &amp;</td>
      <td class="GridField">916 APPLETON AVE, INDEPENDENCE, MO 64054 UNITED STATES</td>
    </tr>
    <tr>
      <td class="GridField">Owner</td>
      <td class="GridFieldNumeric">100</td>
      <td class="GridField">TURNER CARA F &amp; TURNER ASHLEY C &amp;</td>
      <td class="GridField">916 APPLETON AVE, INDEPENDENCE, MO 64054 UNITED STATES</td>
    </tr>
    <tr>
      <td class="GridField">Owner</td>
      <td class="GridFieldNumeric">100</td>
      <td class="GridField">MUSGRAVE CASSAUNDRA F</td>
      <td class="GridField">916 APPLETON AVE, INDEPENDENCE, MO 64054 UNITED STATES</td>
    </tr>
  </tbody>
</table>

I need to get only the elements starting from the second tr(".//table[@id='RealDataGrid']/tbody/tr[>1]". How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lcd1232, 2016-08-06
@lcd1232

Issue resolved. Axes must be used.
.//table[@id='RealDataGrid']/tbody/tr[1]/following-sibling::tr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question