Learn R Programming

xml2 (version 1.0.0)

write_xml: Write XML to disk.

Description

This writes out both XML and normalised HTML.

Usage

write_xml(x, file, ...)

Arguments

x
A document or node to write to disk. It's not possible to save nodesets containing more than one node.
file
Path to file to write.
...
additional arguments passed to methods.

Examples

Run this code
h <- read_html("<p>Hi!</p>")

tmp <- tempfile(fileext = ".xml")
write_xml(h, tmp)
read_xml(tmp)

Run the code above in your browser using DataLab