xml_xpath()
queries an indexed PubMedCentral XML
file, returning records indicated by db_index
and queried
using xpath
.
Arguments
- `db_index`
a tibble with columns
start
andlength
, typcially the result of filtering theindex
table of apmcbioc_db()
database.- `xpath`
NULL
or acharacter(1)
XPath expression to query the records indb_index
.
Value
When xpath = NULL
, xml_xpath()
returns an XML object
representing all records in db_index
as a
<pmc-articleset>...</pmc-articleset>
.
When xpath
is character(1)
, the records in db_index
are queried using XPath. The return value can be coerced to an
R representation with XML::xmlValue()
.