Note: this function assumes all records are of the type "PubmedArticle" and will return an empty record for any other type (including books).
Arguments
- record
Either and XMLInternalDocument or character the record to be parsed ( expected to come from
entrez_fetch)
Examples
# \donttest{
hox_paper <- entrez_search(db="pubmed", term="10.1038/nature08789[doi]")
hox_rel <- entrez_link(db="pubmed", dbfrom="pubmed", id=hox_paper$ids)
recs <- entrez_fetch(db="pubmed",
id=hox_rel$links$pubmed_pubmed[1:3],
rettype="xml")
#> Error: HTTP failure: 400
#> <?xml version="1.0" encoding="UTF-8" ?>
#> <!DOCTYPE eEfetchResult PUBLIC "-//NLM//DTD efetch 20131226//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20131226/efetch.dtd">
#> <eFetchResult>
#> <ERROR> Error: External viewer error: Empty Response. Bytes read: 0 Status: Timeout</ERROR>
#> </eFetchResult>
parse_pubmed_xml(recs)
#> Error: object 'recs' not found
# }
