Read and write documents

read_xml() read_html()

Read HTML or XML.

write_xml() write_html()

Write XML or HTML to disk.

download_xml() download_html()

Download a HTML or XML file

Class coercion

as_list()

Coerce xml nodes to a list.

as_xml_document()

Coerce a R list to xml nodes.

URL manipulation

url_absolute() url_relative()

Convert between relative and absolute urls.

url_escape() url_unescape()

Escape and unescape urls.

url_parse()

Parse a url into its component pieces.

Create and modify and document

xml_new_document() xml_new_root()

Create a new document, possibly with a root node

xml_replace() xml_add_sibling() xml_add_child() xml_add_parent() xml_remove()

Modify a tree by inserting, replacing or removing nodes

xml_attr() xml_has_attr() xml_attrs() `xml_attr<-`() xml_set_attr() `xml_attrs<-`() xml_set_attrs()

Retrieve an attribute.

xml_name() `xml_name<-`() xml_set_name()

The (tag) name of an xml element.

xml_set_namespace()

Set the node's namespace

xml_text() `xml_text<-`() xml_set_text() xml_double() xml_integer()

Extract or modify the text

xml_cdata()

Construct a cdata node

xml_comment()

Construct a comment node

xml_dtd()

Construct a document type definition

xml_ns_strip()

Strip the default namespaces from a document

Search and navigate a document

xml_find_all() xml_find_first() xml_find_num() xml_find_chr() xml_find_lgl()

Find nodes that match an xpath expression.

xml_attr() xml_has_attr() xml_attrs() `xml_attr<-`() xml_set_attr() `xml_attrs<-`() xml_set_attrs()

Retrieve an attribute.

xml_path()

Retrieve the xpath to a node

Inspect a document

xml_ns() xml_ns_rename()

XML namespaces.

xml_ns_strip()

Strip the default namespaces from a document

xml_children() xml_child() xml_contents() xml_parents() xml_siblings() xml_parent() xml_length() xml_root()

Navigate around the family tree.

xml_structure() html_structure()

Show the structure of an html/xml document.

xml_type()

Determine the type of a node.

xml_url()

The URL of an XML document

xml_validate()

Validate XML schema

Utilities

xml_serialize() xml_unserialize()

Serializing XML objects to connections.

xml2_example()

Get path to a xml2 example