* 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 */
| 3084 | * Returns 1 if empty, 0 if not and -1 in case of error |
| 3085 | */ |
| 3086 | int |
| 3087 | xmlTextReaderIsEmptyElement(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: |
no outgoing calls