I'm trying to modify this:
"//tr|//tr//descendant::text()",
so that it doesn't search for whole table rows, but rather just the third cell in table rows. I thought it would be:
"//tr/td[3]|//tr/td[3]//descendant::text()",
but that's not it.
By the way this is from a Greasemonkey script which matches an array of keywords against the contents of the element that XPath is searching which is why I want to modify it because at the moment it's filtering out too many rows.
Just to clarify, this is you
Just to clarify, this is you trying to edit an application of Xpath in Js and not in CSS - correct?
Yep, js.
Yep, js.
Is this necessary if you
Is this necessary if you still tell the browsers to parse the page as HTML? I know it's not valid according to the W3C validator, but what's important is not that the page validates there but rather that the code is valid.
Hi Tyssen, I haven't looked
Hi Tyssen,
I haven't looked at xpath before but the quick look I just had seems to suggest it should be:
//tr/td[position()=3]//descendant::text()
Thanks Tony, that looks like
Thanks Tony, that looks like it might've done the trick.



