XPath expression for a phpBB forum
- by Biff
I'm writing a Greasemonkey script, and I wanted to change the text of a forum post on a phpBB2 forum by using XPath to select the body of the post that occurs after a certain username, but the whole thing is a giant mess of tables.
<tr>
<td>
<span class="name">
<a>
<b>username</b>
</span>
<span></span>
</td>
<td>
<table>
<tbody>
<tr></tr>
<tr></tr>
<tr>
<td>
<span class="postbody">text of post</span>
<span></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
I need to get the postbody span that happens after the username in the b tag equals a certain name, and then mess with the text.