url_absolute {xml2} | R Documentation

## Convert between relative and absolute urls.

### Description

Convert between relative and absolute urls.

### Usage

    url_absolute(x, base)

    url_relative(x, base)

### Arguments

`x` | A character vector of urls relative to that base
`base` | A string giving a base url.

### Value

A character vector of urls

### See Also

`xml_url` to retrieve the URL associated with a document

### Examples

    url_absolute(c(".", "..", "/", "/x"), "http://hadley.nz/a/b/c/d")

    url_relative("http://hadley.nz/a/c", "http://hadley.nz")
    url_relative("http://hadley.nz/a/c", "http://hadley.nz/")
    url_relative("http://hadley.nz/a/c", "http://hadley.nz/a/b")
    url_relative("http://hadley.nz/a/c", "http://hadley.nz/a/b/")

[Package xml2 version 1.2.0 Index]