#!/usr/local/bin/python3 import xml.etree.ElementTree as etree e = etree.fromstring('<sss:a xmlns:sss="asdfg"><sss:b/></sss:a>') print(e.tag)