# Literal xml/html is useful for small examples
read_xml("")
read_html("Hi<title></html>")
read_html("<html><title>Hi")
# From a local path
read_html(system.file("extdata", "r-project.html", package = "xml2"))
if (FALSE) {
# From a url
cd <- read_xml(xml2_example("cd_catalog.xml"))
me <- read_html("http://had.co.nz")
}
Run the code above in your browser using DataLab