Learn R Programming

xml2 (version 0.1.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.

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