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

Function xmlTextReaderIsEmptyElement

ThirdParty/libxml2/vtklibxml2/xmlreader.c:3086–3105  ·  view source on GitHub ↗

* xmlTextReaderIsEmptyElement: * @reader: the xmlTextReaderPtr used * * Check if the current node is empty * * Returns 1 if empty, 0 if not and -1 in case of error */

Source from the content-addressed store, hash-verified

3084 * Returns 1 if empty, 0 if not and -1 in case of error
3085 */
3086int
3087xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader) {
3088 if ((reader == NULL) || (reader->node == NULL))
3089 return(-1);
3090 if (reader->node->type != XML_ELEMENT_NODE)
3091 return(0);
3092 if (reader->curnode != NULL)
3093 return(0);
3094 if (reader->node->children != NULL)
3095 return(0);
3096 if (reader->state == XML_TEXTREADER_END)
3097 return(0);
3098 if (reader->doc != NULL)
3099 return(1);
3100#ifdef LIBXML_XINCLUDE_ENABLED
3101 if (reader->in_xinclude > 0)
3102 return(1);
3103#endif
3104 return((reader->node->extra & NODE_IS_EMPTY) != 0);
3105}
3106
3107/**
3108 * xmlTextReaderLocalName:

Callers 4

processNodeFunction · 0.85
xmlSchemaVReaderWalkFunction · 0.85
processNodeFunction · 0.85
patternNodeFunction · 0.85

Calls

no outgoing calls

Tested by 2

processNodeFunction · 0.68
patternNodeFunction · 0.68