I wish to extract a link on a set of pages. Sometimes this link is defined on a page as:
//*[@id="mainlist"]/dl/dt[3]/a
and sometimes as:
//*[@id="mainlist"]/dl[2]/dt[2]/a
The text associated with the link is always "My special link".
Is there a way to match a href child of //*[@id="mainlist"]
which has the text "My special link"?