def parse(self, text):
        """Parse the text content
        """
        root = ET.fromstring(text)
        for elm in root.findall('{http://www.iana.org/assignments}registry'):
            for record in elm.findall('{http://www.iana.org/assignments}record'):
                for fileElm in record.findall('{http://www.iana.org/assignments}file'):
                    if fileElm.get('type') == 'template':
                        mimeType = fileElm.text.strip()
                        yield mimeType
                        break
def parse ( self , text ) : root = ET . fromstring ( text ) for elm in root . findall ( '{http://www.iana.org/assignments}registry' ) : for record in elm . findall ( '{http://www.iana.org/assignments}record' ) : for fileElm in record . findall ( '{http://www.iana.org/assignments}file' ) : if fileElm . get ( 'type' ) == 'template' : mimeType = fileElm . text . strip ( ) yield mimeType break
Parse the text content