@classmethod
def expand_tags(cls, elem, tags):
    """Keep <elem></elem> instead of shortening to <elem/>"""
    if elem.tag in tags and elem.text is None:
        elem.text = ''
    for c in elem:
        cls.expand_tags(c, tags)
