def get_tagname(element):
 try:
  tagname = element.tag.split('}')[1]
 except IndexError:
  tagname = element.tag
 return tagname

def get_tagname ( element ) : try : tagname = element . tag . split ( '}' ) [ 1 ] except IndexError : tagname = element . tag return tagname
get tagname without namespace .