I have an absolute URL and a relative URL that I would like to join (like urljoin in Python). For the example of How to join absolute and relative urls?:
url1 <- "http://127.0.0.1/test1/test2/test3/test5.xml"
url2 <- "../../test4/test6.xml"
where url2 is given with reference to the absolute URL url1. How can I get the absolute URL for url2?