Takes objects of class list
or xml_document
and converts
them to a tibble with a particular structure, designed for storing nested
data. Tibbles are required because attributes are stored as list-columns,
which are not supported by class data.frame
.
Usage
as_eml_tbl(x, ...)
# S3 method for class 'tbl_df'
as_eml_tbl(x, ...)
# S3 method for class 'tbl_lp'
as_eml_tbl(x, ...)
# S3 method for class 'list'
as_eml_tbl(x, ...)
# S3 method for class 'xml_document'
as_eml_tbl(x, ...)
Value
An object of class tbl_df
, tbl
and data.frame
, containing
the following fields:
level
(int) gives the nestedness level of the node/heading in questionlabel
(chr) thexml
tagtext
(chr) Any text stored within that tagattributes
(list) Any attributes for that tag
Examples
if (FALSE) { # \dontrun{
df <- xml2::read_xml("https://collections.ala.org.au/ws/eml/dr368") |>
as_eml_tbl()
} # }