Consume an end tag.
8.2.4.9
779598
protected function endTag() {
        if ($this->scanner->current() != '/') {
            return false;
        }
        $tok = $this->scanner->next();

        // a-zA-Z -> tagname
        // > -> parse error
        // EOF -> parse error
        // -> parse error
        if (!ctype_alpha($tok)) {
            $this->parseError("Expected tag name, got '%s'", $tok);
            if ($tok == "\0" || $tok === false) {
                return false;
            }
            return $this->bogusComment('</');
        }

        $name = strtolower($this->scanner->charsUntil("\n\f \t>"));
        // Trash whitespace.
        $this->scanner->whitespace();

        if ($this->scanner->current() != '>') {
            $this->parseError("Expected >, got '%s'", $this->scanner->current());
            // We just trash stuff until we get to the next tag close.
            $this->scanner->charsUntil('>');
        }

        $this->events->endTag($name);
        $this->scanner->next();
        return true;
    }
1356443
def handle_endtag(self, tag):
        
        self.log.debug( u'Encountered an end tag : {0}'.format(tag) )
        if tag in self.sanitizelist:
            self.level -= 1
            return
        if tag in self.unclosedTags:
            return
        if self.isNotPurify or tag in self.whitelist_keys:
            self.data.append(u'</%s>' % tag)
1023533
public void endElement(String tag) {
        if ( "value".equals(tag) ) {
            StringBuilder fName = new StringBuilder();
            for (int k = 0; k < fieldNames.size(); ++k) {
                fName.append(".").append((String)fieldNames.elementAt(k));
            }
            if (fName.charAt(0) == '.') {
            	fName.deleteCharAt(0);
            }
            String fNameString = fName.toString();
            String fVal = (String) fieldValues.pop();
            String old = (String) fields.put( fNameString, fVal );
            if (old != null) {
            	List l = (List) listFields.get(fNameString);
            	if (l == null) {
            		l = new ArrayList();
            		l.add(old);
            	}
            	l.add(fVal);
            	listFields.put(fNameString, l);
            }
        }
        else if ("field".equals(tag)) {
            if (!fieldNames.isEmpty()) {
                fieldNames.pop();
            }
        }
    }
552377
function (node) {
    switch (node.nodeType) {
      case NODE_TYPE.ELEMENT:
        this._endVisitElement(node);
        break;
      // No ending tags required for these types
      case NODE_TYPE.TEXT:
      case NODE_TYPE.COMMENT:
        break;
    }
  }
209152
public static String endTag(String string)
    {
        if (string.indexOf(' ') != -1)
            string = string.substring(0, string.indexOf(' '));
        return "</" + string + '>';
    }
603272
def handle_endtag(self, tag):
        """"""
        if tag.lower() in self.allowed_tag_whitelist:
            if tag.lower() in ['ul', 'ol']:
                self.previous_type_lists = self.previous_type_lists[:-1]
                if tag.lower() == 'ol':
                    self.nb = self.previous_nbs[-1]
                    self.previous_nbs = self.previous_nbs[:-1]
                # we must remove any non-relevant spacing and end of
                # line before
                self.result = self.result.rstrip()
                self.result += '\n' + self.line_quotation
51795
def end_output (self, **kwargs):
        """"""
        self.xml_endtag(u"urlset")
        self.xml_end_output()
        self.close_fileoutput()
796629
private static StringBuffer doAppendClosingTag(StringBuffer buffer, String tag)
	{
		buffer.append(SEQUENCE__TAG__BEGIN_CLOSING_TAG).append(tag).append(SEQUENCE__TAG__END_OF_TAG);
		return buffer;
	}
318361
def _handle_end(self):
        """"""
        if self._context & contexts.FAIL:
            if self._context & contexts.TAG_BODY:
                if is_single(self._stack[1].text):
                    return self._handle_single_tag_end()
            if self._context & contexts.TABLE_CELL_OPEN:
                self._pop()
            if self._context & contexts.DOUBLE:
                self._pop()
            self._fail_route()
        return self._pop()
950852
@Override
	public void endElement(String uri, String localName, String name) throws SAXException
    {
        super.endElement(uri, localName, name);
        String currentPath = StringTools.join(nameStack, "/");
        onNode(name,currentPath);
        nameStack.pop();
     }
505808
@Override
    public void endElement(final String uri, final String localName, final String qName) throws SAXException {

        LOG.trace("endElement uri={} localName={} qName={}", uri, localName, qName);
        if (this.isNotInkstandNamespace(uri)) {
            return;
        }
        switch (localName) {
            case "rootNode":
                LOG.debug("Closing rootNode");
                this.nodeStack.pop();
                break;
            case "node":
                LOG.debug("Closing node");
                this.nodeStack.pop();
                break;
            case "mixin":
                LOG.debug("Closing mixin");
                break;
            case "property":
                this.endElementProperty();
                break;
            default:
                break;
        }
    }
593165
public void endElement(String uri, String name, String qName)
    {
        boolean isDebug = logger.isDebugEnabled();
        try
        {
            switch (getLiteralId(qName))
            {
                case MAPPING_REPOSITORY:
                    {
                        if (isDebug) logger.debug(" < " + tags.getTagById(MAPPING_REPOSITORY));
                        this.m_CurrentAttrContainer = null;
                        m_CurrentCLD = null;
                        break;
                    }
                case CLASS_DESCRIPTOR:
                    {
                        if (isDebug) logger.debug("  < " + tags.getTagById(CLASS_DESCRIPTOR));
                        m_CurrentCLD = null;
                        this.m_CurrentAttrContainer = null;
                        break;
                    }
                case OBJECT_CACHE:
                    {
                        if(m_CurrentAttrContainer != null)
                        {
                            if (isDebug) logger.debug("     < " + tags.getTagById(OBJECT_CACHE));
                        }
                        this.m_CurrentAttrContainer = m_CurrentCLD;
                        break;
                    }
                case CLASS_EXTENT:
                    {
                        break;
                    }
                case FIELD_DESCRIPTOR:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(FIELD_DESCRIPTOR));
                        m_CurrentFLD = null;
                        m_CurrentAttrContainer = m_CurrentCLD;
                        break;
                    }
                case REFERENCE_DESCRIPTOR:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(REFERENCE_DESCRIPTOR));
                        m_CurrentORD = null;
                        m_CurrentAttrContainer = m_CurrentCLD;
                        break;
                    }
                case FOREIGN_KEY:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(FOREIGN_KEY));
                        break;
                    }
                case COLLECTION_DESCRIPTOR:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(COLLECTION_DESCRIPTOR));
                        m_CurrentCOD = null;
                        m_CurrentAttrContainer = m_CurrentCLD;
                        break;
                    }
                case INVERSE_FK:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(INVERSE_FK));
                        break;
                    }
                case ORDERBY :
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(ORDERBY));
                        break;
                    }
                case FK_POINTING_TO_THIS_CLASS:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(FK_POINTING_TO_THIS_CLASS));
                        break;
                    }
                case FK_POINTING_TO_ITEMS_CLASS:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(FK_POINTING_TO_ITEMS_CLASS));
                        break;
                    }
                case ATTRIBUTE:
                    {
                        if(m_CurrentAttrContainer != null)
                        {
                            if (isDebug) logger.debug("      < " + tags.getTagById(ATTRIBUTE));
                        }
                        break;
                    }
                case DOCUMENTATION:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(DOCUMENTATION));
                        break;
                    }
//                case SEQUENCE_MANAGER:
//                    {
//                        // currently not used on class-descriptor level
//                        // if (isDebug) logger.debug("    < " + tags.getTagById(SEQUENCE_MANAGER));
//                        this.m_CurrentAttrContainer = null;
//                        break;
//                    }
//                case CONNECTION_POOL:
//                    {
//                        // not used on class-descriptor level
//                        // if (isDebug) logger.debug("    < " + tags.getTagById(CONNECTION_POOL));
//                        this.m_CurrentAttrContainer = null;
//                        break;
//                    }
//                case JDBC_CONNECTION_DESCRIPTOR:
//                    {
//                        // not used on class-descriptor level
//                        // if (isDebug) logger.debug("    < " + tags.getTagById(JDBC_CONNECTION_DESCRIPTOR));
//                        this.m_CurrentAttrContainer = null;
//                        break;
//                    }
                case QUERY_CUSTOMIZER:
                    {
                        m_CurrentAttrContainer = m_CurrentCOD;
                        break;
                    }
                case INDEX_DESCRIPTOR:
                    {
                        m_CurrentCLD.getIndexes().add(m_CurrentIndexDescriptor);
                        m_CurrentIndexDescriptor = null;
                        break;
                    }
                case INDEX_COLUMN:
                    {
                        // ignore; all processing done in startElement
                        break;
                    }
                case INSERT_PROCEDURE:
                {
                    if (isDebug) logger.debug("    < " + tags.getTagById(INSERT_PROCEDURE));
                    m_CurrentCLD.setInsertProcedure((InsertProcedureDescriptor)m_CurrentProcedure);
                    m_CurrentProcedure = null;
                    break;
                }
                case UPDATE_PROCEDURE:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(UPDATE_PROCEDURE));
                        m_CurrentCLD.setUpdateProcedure((UpdateProcedureDescriptor)m_CurrentProcedure);
                        m_CurrentProcedure = null;
                        break;
                    }
                case DELETE_PROCEDURE:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(DELETE_PROCEDURE));
                        m_CurrentCLD.setDeleteProcedure((DeleteProcedureDescriptor)m_CurrentProcedure);
                        m_CurrentProcedure = null;
                        break;
                    }
                case CONSTANT_ARGUMENT:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(CONSTANT_ARGUMENT));
                        break;
                    }
                case RUNTIME_ARGUMENT:
                    {
                        if (isDebug) logger.debug("    < " + tags.getTagById(RUNTIME_ARGUMENT));
                        break;
                    }

                    // handle failure:
                default :
                    {
                        logger.debug("Ignoring unused Element " + qName);
                    }
            }
        }
        catch (Exception ex)
        {
            if(ex instanceof MetadataException) throw (MetadataException) ex;
            else throw new MetadataException("Exception when reading metadata information,"+
                    " please check your repository.xml file", ex);
        }
    }
789801
def consume_item(rlp, start)
      t, l, s = consume_length_prefix(rlp, start)
      consume_payload(rlp, s, t, l)
    end
553347
def end_document implicit_end = !streaming?
      @last.implicit_end = implicit_end
      n = pop
      set_end_location(n)
      n
    end
1220449
function endTagInBody(p, token) {
    const tn = token.tagName;

    switch (tn.length) {
        case 1:
            if (tn === $.A || tn === $.B || tn === $.I || tn === $.S || tn === $.U) {
                callAdoptionAgency(p, token);
            } else if (tn === $.P) {
                pEndTagInBody(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 2:
            if (tn === $.DL || tn === $.UL || tn === $.OL) {
                addressEndTagInBody(p, token);
            } else if (tn === $.LI) {
                liEndTagInBody(p, token);
            } else if (tn === $.DD || tn === $.DT) {
                ddEndTagInBody(p, token);
            } else if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) {
                numberedHeaderEndTagInBody(p, token);
            } else if (tn === $.BR) {
                brEndTagInBody(p, token);
            } else if (tn === $.EM || tn === $.TT) {
                callAdoptionAgency(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 3:
            if (tn === $.BIG) {
                callAdoptionAgency(p, token);
            } else if (tn === $.DIR || tn === $.DIV || tn === $.NAV || tn === $.PRE) {
                addressEndTagInBody(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 4:
            if (tn === $.BODY) {
                bodyEndTagInBody(p, token);
            } else if (tn === $.HTML) {
                htmlEndTagInBody(p, token);
            } else if (tn === $.FORM) {
                formEndTagInBody(p, token);
            } else if (tn === $.CODE || tn === $.FONT || tn === $.NOBR) {
                callAdoptionAgency(p, token);
            } else if (tn === $.MAIN || tn === $.MENU) {
                addressEndTagInBody(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 5:
            if (tn === $.ASIDE) {
                addressEndTagInBody(p, token);
            } else if (tn === $.SMALL) {
                callAdoptionAgency(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 6:
            if (
                tn === $.CENTER ||
                tn === $.FIGURE ||
                tn === $.FOOTER ||
                tn === $.HEADER ||
                tn === $.HGROUP ||
                tn === $.DIALOG
            ) {
                addressEndTagInBody(p, token);
            } else if (tn === $.APPLET || tn === $.OBJECT) {
                appletEndTagInBody(p, token);
            } else if (tn === $.STRIKE || tn === $.STRONG) {
                callAdoptionAgency(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 7:
            if (
                tn === $.ADDRESS ||
                tn === $.ARTICLE ||
                tn === $.DETAILS ||
                tn === $.SECTION ||
                tn === $.SUMMARY ||
                tn === $.LISTING
            ) {
                addressEndTagInBody(p, token);
            } else if (tn === $.MARQUEE) {
                appletEndTagInBody(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 8:
            if (tn === $.FIELDSET) {
                addressEndTagInBody(p, token);
            } else if (tn === $.TEMPLATE) {
                endTagInHead(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        case 10:
            if (tn === $.BLOCKQUOTE || tn === $.FIGCAPTION) {
                addressEndTagInBody(p, token);
            } else {
                genericEndTagInBody(p, token);
            }

            break;

        default:
            genericEndTagInBody(p, token);
    }
}
1048146
def word_ends(self):
        """"""
        if not self.is_tagged(WORDS):
            self.tokenize_words()
        return self.ends(WORDS)
1183431
def handle_startendtag(self, tag, attrs):
        """"""
        if tag.lower() in self.allowed_tag_whitelist:
            self.result += '<' + tag
            for (attr, value) in attrs:
                if attr.lower() in self.allowed_attribute_whitelist:
                    self.result += ' %s="%s"' % \
                        (attr, self.handle_attribute_value(value))
            self.result += ' />'
        else:
            if self.render_unallowed_tags:
                self.result += '&lt;' + cgi.escape(tag)
                for (attr, value) in attrs:
                    self.result += ' %s="%s"' % \
                        (attr, cgi.escape(value, True))
                self.result += ' /&gt;'