I have a simple question. I’m trying to get a list of the indicators available on the Open data api. I use the RCurl function getURL to pull the contents of http://api.worldbank.org/indicators, and then the XML function xmlTreeParse on the resulting xml page. But xmlTreeParse just treats the xml file as a big block of test. Why is this? Thanks!
library(RCurl)
library(XML)
temp <- getURL("http://api.worldbank.org/indicators)
temp <- xmlTreeParse(temp)
You can use
use
xmlParseorxmlTreeParse(useInternalNodes=T)with this simple structure you can transform to a dataframe as follows
or a list