Hey Jquery hackers:

I'm doing some work with the Xpath plugin and I notice it doesn't
support expressions like:

/html/body/center/form/table/tbody/tr/td[2]/input[3]
(Used to select the search box on www.google.com!)

I would like to extend the plugin to support this kind of expression.

Because (to my knowledge) CSS selectors don't specify a way of
selecting specific child elements I believe that the best way to run
the selector recursively:

Given the selector:
/html/body/center/form/table/tbody/tr/td[2]/input[3]

Run 1st:
/html/body/center/form/table/tbody/tr/td
Get the 2nd result.

Run 2nd:
td/input
Run td/input on the final result of the 1st run. Return the 3rd
result.

Does anyone else have any experience tackling this kind of problem?
(or know about a CSS selector rule that does this : P)

Thanks,

John

Reply via email to