getxml_authors: General function to read xml files in with error catching,...

View source: R/internal.r

getxml_authorsR Documentation

General function to read xml files in with error catching, plus xpath parsing.

Description

General function to read xml files in with error catching, plus xpath parsing.

Usage

  getxml_authors(dir)

Arguments

x

Complete directory to .xml file, including file name.

xpath

A string (character vector of length 1) giving the XPath expression to evaluate.

Details

Included reading xml file and xpath parsing so that whole xml files don't have to be read in, but only the text parsed on into RAM. Typically this function will only be called internally by other fxns.

Examples

url <- "http://www.plosone.org/article/fetchObjectAttachment.action?uri=info%3Adoi%2F10.1371%2Fjournal.pone.0040348&representation=XML"
getxml_authors(url)
getxml_authors(dir="/Users/ScottMac/hindawi/2011/ISRN.GEOMETRY/161523-2011-08-15.xml")

ropensci/rhindawi documentation built on May 18, 2022, 6:40 p.m.