(elem, encoding='utf-8')
return data[data.rindex('<'):]
Render just a closing tag for elem.
Render just a closing tag for elem.
Render just a closing tag for elem .
def close_tag(elem, encoding='utf-8'):
    """Render just a closing tag for elem."""

    ## Complement of open_tag_hack().
    elem.text = ' '
    data = etree.tostring(elem, encoding=encoding)
    elem.clear()

    ## <stream:stream ...> </stream:stream> ==> </stream:stream>
    return data[data.rindex('<'):]
def close_tag ( elem , encoding = 'utf-8' ) : ## Complement of open_tag_hack(). elem . text = ' ' data = etree . tostring ( elem , encoding = encoding ) elem . clear ( ) ## <stream:stream ...> </stream:stream> ==> </stream:stream> return data [ data . rindex ( '<' ) : ]