ich will "U10 Boys" Text auf der Grundlage von "2014 Frühling Freizeitaktivitäten Fußball" Text aus der folgenden HTML-Struktur unter Verwendung von XPath suchen:Locate Element mit XPath
<div>
<div>
<table>
<thead>
<tr>
<td>
<table>
<tbody>
<tr>
<td > </td>
<td >
<span>2014 Spring Recreation Soccer</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</thead>
</table>
</div>
<div>
<table >
<tbody>
<tr >
<td >1</td>
<td >
<b>
<span >U10 Boys</span>
</b>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Ich habe versucht folgende XPath, aber es ist nicht Arbeiten.
//span[contains(text(), "U10 Boys")]//following-sibling::table/thead/tr/td[1]/table/tbody/tr/td[2]/span[contains(text(), "2014 Spring Recreation Soccer")]
The Am schnellsten finde ich Firebug (in Firefox) zu verwenden, klicke mit der rechten Maustaste auf ein Element und wähle 'Copy as XPath' – LDJ