def getElementByTagName(self, element, tagName, noneAllowed = False):
        elements = element.getElementsByTagName(tagName)
        if not noneAllowed and not elements:
            raise self.HandlerParseError(_("Element '%s' not found!" % tagName))
        if len(elements) > 1:
            raise self.HandlerParseError(_("Multiple '%s' elements found!" % tagName))
        return elements[0]
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/formats/xliff.py/XliffHandler.getElementByTagName/original