This is useful for interpreting relative urls with url_relative()
.
xml_url(x)
A character vector of length 1. Returns NA
if the name is
not set.
catalog <- read_xml(xml2_example("cd_catalog.xml"))
xml_url(catalog)
#> [1] "/tmp/RtmpvloQPm/temp_libpath2d28e140222f09/xml2/extdata/cd_catalog.xml"
x <- read_xml("<foo/>")
xml_url(x)
#> [1] NA