MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlDocGetRootElement

Function xmlDocGetRootElement

ThirdParty/libxml2/vtklibxml2/tree.c:5053–5065  ·  view source on GitHub ↗

* xmlDocGetRootElement: * @doc: the document * * Get the root element of the document (doc->children is a list * containing possibly comments, PIs, etc ...). * * Returns the root element or NULL if no element was found. */

Source from the content-addressed store, hash-verified

5051 * Returns the root element or NULL if no element was found.
5052 */
5053xmlNodePtr
5054xmlDocGetRootElement(const xmlDoc *doc) {
5055 xmlNodePtr ret;
5056
5057 if (doc == NULL) return(NULL);
5058 ret = doc->children;
5059 while (ret != NULL) {
5060 if (ret->type == XML_ELEMENT_NODE)
5061 return(ret);
5062 ret = ret->next;
5063 }
5064 return(ret);
5065}
5066
5067#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
5068/**

Callers 15

RequestDataMethod · 0.85
parseMethod · 0.85
readItemsMethod · 0.85
xmlParseXMLCatalogFileFunction · 0.85
walkDocFunction · 0.85
xmlValidateRootFunction · 0.85
xmlValidateDtdFunction · 0.85
xmlValidateDocumentFunction · 0.85
xmlconfTestFunction · 0.85
xmlXPathNodeValHashFunction · 0.85
xmlXPathNextChildElementFunction · 0.85

Calls

no outgoing calls

Tested by 3

patternTestFunction · 0.68
load_xpath_exprFunction · 0.68
c14nRunTestFunction · 0.68