extract_toc: Extract values from XML

Description Usage Arguments Details Value Examples

View source: R/extract_toc.R

Description

Extracts the values of a node from the Eurostat XML Table of contents (TOC) file

Usage

1

Arguments

ns

An XML nodeset from the XML TOC file

Details

It is a subfunction to use in the get_eurostat_toc function.

Value

a character vector with all the values of the nodeset.

Examples

1
2
3
4
5
6
cfg<-get("cfg",envir=.restatapi_env) 
rav<-get("rav",envir=.restatapi_env)
toc_endpoint<-eval(parse(text=paste0("cfg$TOC_ENDPOINT$'",rav,"'$ESTAT$xml")))

xml_leafs<-xml2::xml_find_all(xml2::read_xml(toc_endpoint),".//nt:leaf")
extract_toc(xml_leafs[1])

restatapi documentation built on July 24, 2019, 1:05 a.m.