Søgning og display af html fil med xpath
Hejsa!Kan man med xpath få vist flere elementer en den man søger på fra et given sted og nedefer i html filen
her er et udpluk.
Det er apache loadbalance Manager
<table border="0" style="text-align: left;"><tr><th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th></tr>
<tr><td>JSESSIONID</td><td>0</td><td>1</td>
<td>byrequests</td>
</table>
<br />
<table border="0" style="text-align: left;"><tr><th>Worker URL</th><th>Route</th><th>RouteRedir</th><th>Factor</th><th>Set</th><th>Status</th><th>Elected</th><th>To</th><th>From</th></tr>
<tr>
<td><a href="/balancer-manager?b=server011-kunde01&w=ajp://server01:8109&nonce=a8372e24-fe6d-11e2-beef-c3add7e11403">ajp://server01:8109</a></td><td>server011</td><td></td><td>1</td><td>0</td><td>Ok</td><td>0</td><td> 0 </td><td> 0 </td></tr>
<tr>
<td><a href="/balancer-manager?b=server011-kunde01&w=ajp://server02:8109&nonce=a8372e24-fe6d-11e2-beef-c3add7e11403">ajp://server02:8109</a></td><td>server021</td><td></td><td>1</td><td>0</td><td>Ok</td><td>0</td><td> 0 </td><td> 0 </td></tr>
</table>
<hr />
<h3>LoadBalancer Status for balancer://server011-kunde02</h3>
<table border="0" style="text-align: left;"><tr><th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th></tr>
<tr><td>JSESSIONID</td><td>0</td><td>1</td>
<td>byrequests</td>
</table>
<br />
<table border="0" style="text-align: left;"><tr><th>Worker URL</th><th>Route</th><th>RouteRedir</th><th>Factor</th><th>Set</th><th>Status</th><th>Elected</th><th>To</th><th>From</th></tr>
<tr>
<td><a href="/balancer-manager?b=server011-kunde02&w=ajp://server01:8109&nonce=a8372e24-fe6d-11e2-beef-c3add7e11403">ajp://server01:8109</a></td><td>server011</td><td></td><td>1</td><td>0</td><td>Ok</td><td>77229</td><td>1.5M</td><td>421M</td></tr>
<tr>
<td><a href="/balancer-manager?b=server011-kunde02&w=ajp://server02:8109&nonce=a8372e24-fe6d-11e2-beef-c3add7e11403">ajp://server02:8109</a></td><td>server021</td><td></td><td>1</td><td>0</td><td>Ok</td><td>77102</td><td>7.5M</td><td>384M</td></tr>
</table>
Jeg ville gerne hvis jeg kunne få værdierne
Route og Set kollonerne ud hvor Route er = med Server011 eller Server021
jeg har rodet noget med det men kan ikke få det til at spille
xpath('//table//td[. ="server011"] and //td[3]')