Function xmlDocSetRootElement
Source #[unsafe(no_mangle)]
pub unsafe extern "C" fn xmlDocSetRootElement(
doc: *mut _xmlDoc,
root: *mut _xmlNode,
) -> *mut _xmlNode
Expand description
Set the root element of a document.
§UPSTREAM-PARITY
xmlNodePtr xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root);
Returns the old root element (if any), which the caller must free.
§SAFETY
doc must be a valid document.
root must be a valid node (ownership transfers to doc).