xml_new_document | R Documentation |
xml_new_document
creates only a new document without a root node. In
most cases you should instead use xml_new_root
, which creates a new
document and assigns the root node in one step.
xml_new_document(version = "1.0", encoding = "UTF-8")
xml_new_root(
.value,
...,
.copy = inherits(.value, "xml_node"),
.version = "1.0",
.encoding = "UTF-8"
)
version |
The version number of the document. |
encoding |
The character encoding to use in the document. The default encoding is ‘UTF-8’. Available encodings are specified at http://xmlsoft.org/html/libxml-encoding.html#xmlCharEncoding. |
.value |
node to insert. |
... |
If named attributes or namespaces to set on the node, if unnamed text to assign to the node. |
.copy |
whether to copy the |
.version |
The version number of the document, passed to |
.encoding |
The encoding of the document, passed to |
A xml_document
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.