pub fn doc_get_root_element(doc: *mut _xmlDoc) -> *mut _xmlNodeExpand description
Get the root element of a document.
§UPSTREAM-PARITY
xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc);Returns the root element, or NULL if the document has no root element. Skips non-element nodes (like PIs, comments) at the document level.
§Safety
docmust be a valid pointer to an_xmlDoc, or NULL; when non-NULL it is dereferenced and itschildrenchain is walked.