Yeah, but the span tag is 'dynamically' used to highlight the cell. So
if the user comes to that page again, he wont see the span tag at
all.(because I add the span tags before displaying it to the user). So
i want to grab the entire Xpath without using span in between, so if
the user comes that page again, i can retrieve the Xpath (from a
database for e.g) and trace back to that tag.
Mike Schilling - 03 Mar 2006 17:24 GMT
> Yeah, but the span tag is 'dynamically' used to highlight the cell. So
> if the user comes to that page again, he wont see the span tag at
> all.(because I add the span tags before displaying it to the user). So
> i want to grab the entire Xpath without using span in between, so if
> the user comes that page again, i can retrieve the Xpath (from a
> database for e.g) and trace back to that tag.
Oh. In that case, it's harder. You need to navigate via parent nodes to
the document element, at each node figuring out how many previous sibling
nodes there are with the same name, and generate an XPath like
/level1/level2[2]/level3[1]/level4[1]/td[12]