I am a newbie to R and xml, and i would like to fetch some data from a webpage, however, my code fails due to (I guess) xml namespace, (correct me if i am wrong), what should i do to make my code ok?
data <- "http://usda.mannlib.cornell.edu/usda/current/wasde/wasde-01-12-2015.xml"
path <- "//sr15//matrix1//attribute4[@attribute4='Ending Stocks']//m1_year_group[@market_year4='2013/14 Est.']//Cell"
getNodeSet(data,path)
returns NULL
Nevertheless, if I parse a different xml without xmlns="wasde", it's possible to read
data2 <- "http://usda.mannlib.cornell.edu/usda/waob/wasde//2010s/2014/wasde-12-10-2014.xml"
getNodeSet(data2,path)
Any thought? Many thanks in advance.