Skip to content
Prev 4189 / 15075 Next

Failure message in R on Mac with xmlTreeParse

Hello

In the following thread (R-help) the possibilities of analyzing
publications from pubmed via XML were discussed:

http://www.nabble.com/Analyzing-Publications-from-Pubmed-via-XML-to14328779.html#a14343090

Using xmlTreeParse in a function results in a failure message on my
Mac which is not reproduced in R for Windows:
+ 	srch.stem <- "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?"
+ 	srch.mode <- "db=pubmed&retmax=10000&retmode=xml&term="
+ 	doc <-xmlTreeParse(paste(srch.stem,srch.mode,term,sep=""),isURL = TRUE,
+ 		useInternalNodes = TRUE)
+ 	sapply(c("//Id"), xpathApply, doc = doc, fun = xmlValue)
+ 	}
Fehler in .Call("RS_XML_ParseTree", as.character(file), handlers,
as.logical(ignoreBlanks),  :
  error in creating parser for
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmax=10000&retmode=xml&term=meyer[au]
I/O warning : failed to load external entity
"http%3A//eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi%3Fdb=pubmed&retmax=10000&retmode=xml&term=meyer%5Bau%5D"
The problem seems to be the search tag [au].
I am not very familiar with XML or the xmlTreeParse function, so I
don't know what is wrong. Can anybody help?

Thanks

My version:
$platform
[1] "powerpc-apple-darwin8.10.1"

$arch
[1] "powerpc"

$os
[1] "darwin8.10.1"

$system
[1] "powerpc, darwin8.10.1"

$status
[1] "Patched"

$major
[1] "2"

$minor
[1] "6.0"

$year
[1] "2007"

$month
[1] "11"

$day
[1] "09"

$`svn rev`
[1] "43408"

$language
[1] "R"

$version.string
[1] "R version 2.6.0 Patched (2007-11-09 r43408)"