[Greasemonkey] XPATH pattern
Chris Hayes
chayes at antenna.nl
Sun Sep 24 16:17:35 EDT 2006
esquifit wrote:
> If I guess correctly, you are interested in getting at the content of posts
> in the forum section http://phpfreakz.nl/forum.php?forum=x&iid=xxxxxx,I am
> right?
> If yes, my suggestion is to capture the table rows between two rows with
> only an horizontal rule in them, that is
>
> <TR><TD><hr>
> <TR><TD>CONTENTS <---- target
> <TR><TD><hr>
>
> This is accomplished with the following XPath expression:
>
> //tr[preceding-sibling::*//hr and following-sibling::*//hr]/td
>
Thanks! Before you replied I made :
...../TR/TD[@colspan]/parent::*/following-sibling::*/TD"
(works)
but your suggestions might be directer. I did not test it but the syntax
you give with such a long description between [] is entirely new to me.
More information about the Greasemonkey
mailing list