Xpath Get Full URL by combining a base URL with a string obtained from Xml

xml, xpath

Solution

Use concat or string-join, e.g.

concat('http://domain.com/', //*[@id="page"]/div[1]/table/tr[9]/td[2]/a/@href)

Problem

I am getting a url form a HTML Page with this Xpath: ``` //*[@id="page"]/div[1]/table/tr[9]/td[2]/a/@href ``` This code Output show link like this ``` href="test/306811.zip" ``` I want add site domain to outupt like this: ``` href="http://domain.com/test/306811.zip" ``` How can do this ?

Original source

Related problems