View source: R/darwin_as_xml.R
darwin_as_xml | R Documentation |
Construct simple darwin core
darwin_as_xml(x)
x |
an object of class |
an xml_document
library(xml2) # just dublin core out <- darwin_simple(type = "PhysicalObject", modified = "2009-02-12", language = "en") out xml <- darwin_as_xml(out) xml_structure(xml) write_xml(xml, (f <- tempfile(fileext=".xml"))) # add some darwin core out <- darwin_simple(basisOfRecord = "PreservedSpecimen", taxonID = "12345", scientificName = "Poa annua") out xml <- darwin_as_xml(out) xml_structure(xml) write_xml(xml, (f <- tempfile(fileext=".xml"))) # together out <- darwin_simple(type = "PhysicalObject", modified = "2009-02-12", language = "en", basisOfRecord = "PreservedSpecimen", taxonID = "12345", scientificName = "Poa annua") out xml <- darwin_as_xml(out) xml_structure(xml) write_xml(xml, (f <- tempfile(fileext=".xml")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.