View source: R/xml_serialize.R
xml_serialize | R Documentation |
Serializing XML objects to connections.
xml_serialize(object, connection, ...)
xml_unserialize(connection, ...)
object |
R object to serialize. |
connection |
an open connection or (for |
... |
Additional arguments passed to |
For serialize
, NULL
unless connection = NULL
, when
the result is returned in a raw vector.
For unserialize
an R object.
library(xml2)
x <- read_xml("<a>
<b><c>123</c></b>
<b><c>456</c></b>
</a>")
b <- xml_find_all(x, "//b")
out <- xml_serialize(b, NULL)
xml_unserialize(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.