pub unsafe fn doc_set_root_element(
doc: *mut _xmlDoc,
root: *mut _xmlNode,
) -> *mut _xmlNodeExpand description
Set the root element of a document.
§UPSTREAM-PARITY
xmlNodePtr xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root);If the document already has a root element, the old root is returned. The new root is added as a child of the document.
§SAFETY
docmust be a valid pointer to an _xmlDoc.rootmust be a valid pointer to an _xmlNode, or NULL.