XMLtoDataFrame: Extract the data from a XML document as one (or several) data...

Description Usage Arguments Details Value Examples

View source: R/XMLtoDataFrame.R

Description

Given a XML document, this function maps the potentially nested XML data to one or several data frames. The data extraction algorithm applied in this function is based on the assumption that the XML document describes either one or several entity types containing a set of observations described by different variables.

Usage

1

Arguments

x

a string with the path of a XML document

alignVariables

logical, indicating whether variables/values should be rearranged in case the raw data was malformed (missing variable names)

Details

The data extraction algorithm applied in this function partly relies on a nested (tree-structured) data representation
it is favorable for element based XML. XML documents that largely build on attributes can also be processed.
Several attributes of the same tag will, however, be collected in the same data-frame column.

Value

one data frame or a list of several data frames

Examples

1
2
XML.ex <- system.file("exdata", "microcapital.xml", package = "RWebData")
XMLtoDataFrame(XML.ex, alignVariables=FALSE)

umatter/RWebData documentation built on May 6, 2019, 11:47 a.m.