var vTableExp = "//a[contains(@href,'newdid')]/ancestor::td/ancestor::tr/ancestor::tbody";
var vTable = dom.find(vTableExp, XPFirst);
thanks
var vTableExp = "//a[contains(@href,'newdid')]/ancestor::td/ancestor::tr/ancestor::tbody";
var vTable = dom.find(vTableExp, XPFirst);
thanks
vTableExp
is probably a regexp pattern and then it's being searched for.
It is an XPATH searching against the DOM, looking for wrapping <TBODY>
elements which have a descendant <a>
whose href
contains "newdid".
It finds the first tbody
which is an ancestor of a a tr
element which is an ancestor of a td
element which is an ancestor of an a
element whose href
contains the string newdid
. (IOW, assuming that the parsed document is (X)HTML, select the body of the first table that has a cell containing a link whose address contains the string newdid
.)