XPath expression for a phpBB forum
Posted
by Biff
on Stack Overflow
See other posts from Stack Overflow
or by Biff
Published on 2010-05-26T15:50:32Z
Indexed on
2010/05/26
15:51 UTC
Read the original article
Hit count: 510
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.
© Stack Overflow or respective owner