I tried to parse XMLInternalElementNode to data frame. I have read How to parse XML to R data frame and How to get table data from html table in xml but none of the solutions work for my case.
My code below does not give me a table:
web=getURL("http://www.tocom.or.jp/market/kobetu/rubber.html", header=FALSE, httpheader = c(Accept="text/html"), verbose = TRUE)
doc=htmlParse(web, asText=TRUE, encoding="Windows-1252")
tableNodes = getNodeSet(doc, "//table")
#this gives me error
xmlParse(tableNodes[[2]])
Error in as.vector(x, "character") :
cannot coerce type 'externalptr' to vector of type 'character'
#This does not return me the table neither:
xpathSApply(tableNodes[[2]], path = '//table//tr')
So how should I retrieve the table from this website?