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").value before replacing. If this is FALSE
then the node will be moved from it's current location.xml_new_document(version).xml_new_document(encoding).xml_document object.