0
我想獲得'summary_doc'
但收到錯誤。我該怎麼辦。爲什麼我得到該錯誤:XML內容似乎不是XML
代碼如下
--------------------------------------------------------------
library(XML)
base_url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/"
db = "pubmed"
query = "human+genome+AND+2014"
esearch = sprintf("esearch.fcgi?db=%s&term=%s",db,query)
search_url = paste(base_url, esearch, sep="")
search_doc = xmlParse(search_url)
retmax = 9000
new_esearch = sprintf("esearch.fcgi?db=%s&term=%s&retmax=%s",db,query,retmax)
new_search_url= paste(base_url,new_esearch,sep='')
new_search_doc = xmlParse(new_search_url)
ids = xpathSApply(new_search_doc,path="//IdList/Id",fun='xmlValue')
id_list = paste(ids, coppapse=',')
esummary = sprintf("esummary.fcgi?db=%s&id=%s",db, id_list)
sum_url = paste(base_url, esummary, sep='')
summary_doc = xmlParse(sum_url) #this line makes error
Error: XML content does not seem to be XML:
謝謝你的回答。這對我真的很有幫助。 但有另一個問題。 問:我可以看到'doc'文件嗎? 還有一個我真的很感謝你的回答。 – user4329049 2014-12-06 13:08:40