h <- read_html("Hi!")
tmp <- tempfile(fileext = ".xml")
write_xml(h, tmp, options = "format")
readLines(tmp)
# write formatted HTML output
write_html(h, tmp, options = "format")
readLines(tmp)
Run the code above in your browser using DataCamp Workspace