Serialize a SystemMetadata object to an XML representation
Source:R/SystemMetadata.R
serializeSystemMetadata.Rd
The SystemMetadata object is converted to XML and written to a file.
Usage
serializeSystemMetadata(x, ...)
# S4 method for class 'SystemMetadata'
serializeSystemMetadata(x, version = "v1", ...)
Value
A character value of the filename that the XML representation of the SystemMetadata object was written to.
the character string representing a SystemMetadata object
Details
If the 'version'
parameter is specified as *v2* then the SystemMetadata
object is serialized according to the DataONE version 2.0 system metadata format.
Examples
library(XML)
doc <- xmlParseDoc(system.file("testfiles/sysmeta.xml", package="datapack"), asText=FALSE)
sysmeta <- new("SystemMetadata")
sysmeta <- parseSystemMetadata(sysmeta, xmlRoot(doc))
sysmetaXML <- serializeSystemMetadata(sysmeta, version="v2")