write_xml {xml2} | R Documentation

## 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

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

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

[Package xml2 version 0.1.2 Index]