I have a well formed XHTML page. I want to find the destination URL of a link when I have the text that is linked.
Example
Too late for you, but for anyone else with the same question...
//a[contains(text(), 'programming')]/@href
Of course, 'programming' can be any text fragment.