Parse the endnote element.

def parse_smarttag(document, container, tag_elem):
    "Parse the endnote element."

    tag = doc.SmartTag()

    tag.element = tag_elem.attrib[_name('{{{w}}}element')]

    for elem in tag_elem:
        if elem.tag == _name('{{{w}}}r'):
            parse_text(document, tag, elem)

        if elem.tag == _name('{{{w}}}smartTag'):
            parse_smarttag(document, tag, elem)

    container.elements.append(tag)

    return