Reputation: 113
I am practicing with XPATH to extract text within HTML.
I have the following structure:
<tbody>
<tr class="table-row">
<td class="table-cell">
Name
<br />
Address
<br />
Postcode
<br />
Phone: 111111
<br />
Fax: 123456
<br />
Email: <a class="mail" href="mailto:mail@example.com">mail@example.com</a>
<br />
</td>
</tr>
<tr class="table-row">
<td class="table-cell">
Name
<br />
Address
<br />
Postcode
<br />
Phone: 111111
<br />
Fax: 123456
<br />
Email: <a class="mail" href="mailto:mail@example.com">mail@example.com</a>
<br />
</td>
</tr>
(...)
</tbody>
I manage to navigate different nodes but I can't figure out how to extract within a text node.
In particular, I need to extract text within "Phone:" and following <br />
and "Email:" and following <br />
in all rows in the table.
Upvotes: 0
Views: 126