setwd("C:/LAB/RBAS/dataMining")
sapply(c("RCurl", "XML", "RJSONIO"), require, character.only=T)
html.lin <- readLines(tcon <- textConnection(html.ori)); close(tcon)
# pagetree <- htmlTreeParse(html.lin, error=function(...){}, useInternalNodes = TRUE)
sel <- grep("DataStore.prime\\(\\'stage-player-stat\\'", html.lin)
data <- html.lin[sel]
djson <- gsub("^.*DataStore.*\\[(.*)\\]);", "\\[\\1\\]", data)
res <- fromJSON(djson)
res