marshal.xml_document | R Documentation |
Marshalling of 'xml2' objects
## S3 method for class 'xml_document'
marshal(xml2, ...)
## S3 method for class 'xml_nodeset'
marshal(xml2, ...)
## S3 method for class 'xml_document'
marshallable(...)
## S3 method for class 'xml_nodeset'
marshallable(...)
xml2 |
A xml2::xml_document or similar. |
... |
Not used. |
xml2::xml_serialize()
is used to produce a marshalled version
of the original object.
xml2::xml_unserialize()
is used to reconstruct a version of the
original object from the marshalled object.
A marshalled
object as described in marshal()
.
if (requireNamespace("xml2", quietly = TRUE)) {
doc <- xml2::read_xml("<body></body>")
## Marshal 'xml_document' object
doc_ <- marshal(doc)
## Unmarshal 'xml_document' object
doc2 <- unmarshal(doc_)
stopifnot(all.equal(doc2, doc))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.