Skip to contents

xml_xpath() queries an indexed PubMedCentral XML file, returning records indicated by db_index and queried using xpath.

Usage

xml_xpath(db_index, xpath = NULL, xml_file = "pmc_result.xml")

Arguments

`db_index`

a tibble with columns start and length, typcially the result of filtering the index table of a pmcbioc_db() database.

`xpath`

NULL or a character(1) XPath expression to query the records in db_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().