Learn R Programming

delma (version 0.1.2)

as_eml_xml: Convert metadata to an xml_document

Description

Takes a character vector, tibble, or list and converts it to an xml_document, as defined by the xml2 package. When converting from a list, this is simply a wrapper for xml2::as_xml_document().

Usage

as_eml_xml(x, ...)

# S3 method for tbl_lp as_eml_xml(x, ...)

# S3 method for tbl_df as_eml_xml(x, ...)

# S3 method for list as_eml_xml(x, ...)

# S3 method for xml_document as_eml_xml(x, ...)

Value

An xml_document with the specified nodes and attributes.

Arguments

x

Object to be converted.

...

Other arguments, currently ignored.

Examples

Run this code
source_file <- system.file("extdata", 
                           "bionet_metadata.Rmd",
                           package = "delma")
df <- read_md(source_file)
as_eml_list(df) |> str()

Run the code above in your browser using DataLab