Callback run at the end of each XML element

def endElement(self, name):
        """Callback run at the end of each XML element"""

        content = ''.join(self._contentList)

        if name == 'xtvd':
            self._progress.endItems()
        else:
            try:
                if self._context == 'stations':
                    self._endStationsNode(name, content)
                elif self._context == 'lineups':
                    self._endLineupsNode(name, content)
                elif self._context == 'schedules':
                    self._endSchedulesNode(name, content)
                elif self._context == 'programs':
                    self._endProgramsNode(name, content)
                elif self._context == 'productionCrew':
                    self._endProductionCrewNode(name, content)
                elif self._context == 'genres':
                    self._endGenresNode(name, content)
            except Exception, e:
                self._error = True
                self._progress.printMsg(str(e), error=True)

        self._context = self._contextStack.pop()