map_xml: Map XML Entries

Description Usage Arguments Value

View source: R/map_xml.R

Description

Extracts a dataframe from an xml document.

Usage

1
2
3
4
5
6
7
8
map_xml(
  doc,
  entries_xpath,
  parts,
  trim = c(),
  integers = c(),
  date_format = ""
)

Arguments

doc

An XML document

entries_xpath

an xpath locator for all starting points

parts

a list in the form column name = xpath locator

trim

a list of columns that need to have whitespace trimmed

integers

a list of columns that need to converted to integers

date_format

how dates should be parsed

Value

A dataframe with one row per entry and columns from parts


edgarWebR documentation built on April 24, 2021, 5:09 p.m.