xml2 (version 1.1.0)

xml_url: The URL of an XML document

Description

This is useful for interpreting relative urls with url_relative.

Usage

xml_url(x)

Arguments

x
A node or document.

Value

A character vector of length 1. Returns NA if the name is not set.

Examples

Run this code
catalog <- read_xml("http://www.xmlfiles.com/examples/cd_catalog.xml")
xml_url(catalog)

x <- read_xml("<foo/>")
xml_url(x)

Run the code above in your browser using DataCamp Workspace