Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 在R中进行HTML解析时出错_Xml_R - Fatal编程技术网

Xml 在R中进行HTML解析时出错

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

我在从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_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)中的示例有效吗?