Print HTML end element.

        @param tag: tag name
        @type tag: string
        @return: None
979041
def end_element (self, tag):
        
        tag = tag.encode(self.encoding, "ignore")
        self.fd.write("</%s>" % tag)
682367
public function end_tag($tag) {
        // TODO: check the tag name is valid

        if ($this->level == 0) { // Nothing to end, already at level 0
            throw new xml_writer_exception('xml_writer_end_tag_no_match');
        }

        $pre = $this->lastwastext ? '' : "\n" . str_repeat(' ', ($this->level - 1) * 2); // Indent
        $tag = $this->casefolding ? strtoupper($tag) : $tag; // Follow casefolding

        $lastopentag = array_pop($this->opentags);

        if ($tag != $lastopentag) {
            $a = new stdclass();
            $a->lastopen = $lastopentag;
            $a->tag = $tag;
            throw new xml_writer_exception('xml_writer_end_tag_no_match', $a);
        }

        // Send to xml_output
        $this->write($pre . '</' . $tag . '>');

        $this->level--;
        $this->lastwastext = false;
    }
75147
def _get_end_event(parser, tagName):
    """"""

    (event, node) = six.next(parser)

    if event != pulldom.END_ELEMENT or node.tagName != tagName:
        raise ParseError(
            'Expecting %s end tag, got %s %s' % (tagName, event, node.tagName))
1348334
def print_element(element):
    
    pretty = etree.tostring(
        element, pretty_print=True).decode('utf-8')
    print(pretty)
    return pretty
449651
public void endElement(String namespaceURI, String localName, String qName)
        throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            flush();
            if (namespaceURI == null && m_firstElementURI != null)
                namespaceURI = m_firstElementURI;


            if (localName == null && m_firstElementLocalName != null)
                localName = m_firstElementLocalName;
        }
        
        m_handler.endElement(namespaceURI, localName, qName);
    }
535111
def isEndTagTo(self, opener):
        
        if not (self._isendtag and opener.isOpeningTag()):
            return False

        return self._tagname.lower() == opener.getTagName().lower()
423246
private void readEndTag() throws IOException, KriptonRuntimeException {
		read('<');
		read('/');
		name = readName(); // TODO: pass the expected name in as a hint?
		skip();
		read('>');

		int sp = (depth - 1) * 4;

		if (depth == 0) {
			checkRelaxed("read end tag " + name + " with no tags open");
			type = COMMENT;
			return;
		}

		if (name.equals(elementStack[sp + 3])) {
			namespace = elementStack[sp];
			prefix = elementStack[sp + 1];
			name = elementStack[sp + 2];
		} else if (!relaxed) {
			throw new KriptonRuntimeException("expected: /" + elementStack[sp + 3] + " read: " + name, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
	}
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
329684
public T end(String element) throws IOException {
		writer.write("</");
		writer.write(element);
		writer.write('>');
		return (T) this;
	}
713070
def finishEditing(self, tag):
        
        curr_item = self.currentItem()
        create_item = self.createItem()
        self.closePersistentEditor(curr_item)
        
        if curr_item == create_item:
            self.addTag(tag)
        
        elif self.isTagValid(tag):
            curr_item.setText(tag)
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;'
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
447049
def delete_tags(self, arg):
        

        if len(arg) > 0:
            raw = html.fromstring(arg)
            return raw.text_content().strip()

        return arg
994027
public static String getClosingTag(String tag)
	{
		StringBuffer _result = new StringBuffer();
		return doAppendClosingTag(_result, tag).toString();
	}
679885
def build_tag(self, tag, text='', attrs=None):
        
        """
        return '%s%s%s' % (self.tag_start(tag, attrs), text, self.tag_end(tag))
757295
@Override
    public void endElement(String uri, String l, String q) {
        /*
         * 1. If current element is a String, update its value from the string buffer.
         * 2. Add the element to parent.
         */
        XDB.Element element = Enum.valueOf(XDB.Element.class, l.toUpperCase());

        switch (element) {
        case M:
            break;

        case P:
            _binder.put(_name, _text.toString());
            break;

        case T:
            break;

        case H:
            _heading = _data.toArray(new String[_data.size()]);
            break;

        case R:
            ++_rindex;
            break;

        case C:
            if (_heading == null) {
                _data.add(_text.toString());
            } else {
                _binder.put(_name + '[' + _rindex + "]." + _heading[_cindex], _text.toString());
                ++_cindex;
            }
            break;
        }
        _text.setLength(0);
    }
641180
def _is_end(event, node, tagName): # pylint: disable=invalid-name
    """"""

    return event == pulldom.END_ELEMENT and node.tagName == tagName