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)
#> Warning: NCBI C++ Exception:
#> Error: TXCLIENT(CException::eUnknown) "/pubmed_gen/rbuild/version/20250923/entrez/2.20/src/internal/txclient/TxClient.cpp", line 1100: ncbi::CTxRawClientImpl::readAll() --- Read failed: EOF (the other side has unexpectedly closed connection), peer: 130.14.18.179:8064
#> Error in res[[1]]: subscript out of bounds
recs <- entrez_fetch(db="pubmed",
id=hox_rel$links$pubmed_pubmed[1:3],
rettype="xml")
#> Error: object 'hox_rel' not found
parse_pubmed_xml(recs)
#> Error: object 'recs' not found
# }
