* xmlParseElementEnd: * @ctxt: an XML parser context * * Parse the end of an XML element. Always consumes '</'. */
| 10030 | * Parse the end of an XML element. Always consumes '</'. |
| 10031 | */ |
| 10032 | static void |
| 10033 | xmlParseElementEnd(xmlParserCtxtPtr ctxt) { |
| 10034 | xmlNodePtr cur = ctxt->node; |
| 10035 | |
| 10036 | if (ctxt->nameNr <= 0) { |
| 10037 | if ((RAW == '<') && (NXT(1) == '/')) |
| 10038 | SKIP(2); |
| 10039 | return; |
| 10040 | } |
| 10041 | |
| 10042 | /* |
| 10043 | * parse the end of tag: '</' should be here. |
| 10044 | */ |
| 10045 | if (ctxt->sax2) { |
| 10046 | xmlParseEndTag2(ctxt, &ctxt->pushTab[ctxt->nameNr - 1]); |
| 10047 | namePop(ctxt); |
| 10048 | } |
| 10049 | #ifdef LIBXML_SAX1_ENABLED |
| 10050 | else |
| 10051 | xmlParseEndTag1(ctxt, 0); |
| 10052 | #endif /* LIBXML_SAX1_ENABLED */ |
| 10053 | |
| 10054 | /* |
| 10055 | * Capture end position |
| 10056 | */ |
| 10057 | if (cur != NULL && ctxt->record_info) { |
| 10058 | xmlParserNodeInfoPtr node_info; |
| 10059 | |
| 10060 | node_info = (xmlParserNodeInfoPtr) xmlParserFindNodeInfo(ctxt, cur); |
| 10061 | if (node_info != NULL) { |
| 10062 | node_info->end_pos = ctxt->input->consumed + |
| 10063 | (CUR_PTR - ctxt->input->base); |
| 10064 | node_info->end_line = ctxt->input->line; |
| 10065 | } |
| 10066 | } |
| 10067 | } |
| 10068 | |
| 10069 | /** |
| 10070 | * xmlParseVersionNum: |
no test coverage detected