Sie möchten Text erhalten, der sich außerhalb eines Tags befindet. Hier ist der HTML:So erhalten Sie Text außerhalb des Tags
<table border="0" cellpadding="0" cellspacing="0" width="100%"
class="viewingsCommentsTbl">
<tbody>
<tr>
<td>
<b style="border: 2px solid red;
background: rgb(204, 136, 136);">Viewing Conducted: </b>
18-May-2016
</td>
</tr>
<tr>
<td style=""><b style="">Duration: </b> 1 hr</td>
</tr>
<tr>
<td style=""><b style="">Comments: </b>66yy</td>
</tr>
</tbody>
</table>
Ich wollte Datum dh "18-May-2016"
Ich habe versucht folgende XPath zu bekommen, aber es funktioniert nicht:
//*[@class="viewingsCommentsTbl"]/tbody/tr[1]/td/b