Xml 在R中进行HTML解析时出错
我在从cricinfo提取webdata时遇到以下错误Xml 在R中进行HTML解析时出错,xml,r,Xml,R,我在从cricinfo提取webdata时遇到以下错误 > #Set internet > Setinternet2=TRUE > > #Loading Libraries > library(XML) > library(tm) > library(RCurl) > > #URL > URL="http://stats.espncricinfo.com/ci/engine/records/batting/most_runs_car
> #Set internet
> Setinternet2=TRUE
>
> #Loading Libraries
> library(XML)
> library(tm)
> library(RCurl)
>
> #URL
> URL="http://stats.espncricinfo.com/ci/engine/records/batting/most_runs_career.html?class=1;id=2010;type=year"
>
> #HTML parsing
> List=htmlParse(URL)
Error in htmlParse(URL) :
error in creating parser for http://stats.espncricinfo.com/ci/engine/records/batting/most_runs_career.html?class=1;id=2010;type=year
>
你知道怎么解决这个问题吗?试试看
page <- getURL(URL)
htmlParse(page)
页面适合我。当我说“有效”时,我的意思是我收到了一大堆htmlEntityParseRef消息、标记不匹配和一大堆其他警告。帮助(htmlParse)中的示例有效吗?