powered by
Serializing XML objects to connections.
xml_serialize(object, connection, ...)xml_unserialize(connection, ...)
xml_unserialize(connection, ...)
For serialize, NULL unless connection = NULL, when the result is returned in a raw vector.
serialize
NULL
connection = NULL
For unserialize an R object.
unserialize
R object to serialize.
an open connection or (for serialize) NULL or (for unserialize) a raw vector (see ‘Details’).
Additional arguments passed to read_xml().
read_xml()
library(xml2) x <- read_xml(" 123 456 ") b <- xml_find_all(x, "//b") out <- xml_serialize(b, NULL) xml_unserialize(out)
Run the code above in your browser using DataLab