Callback run at the start of each XML element

def startElement(self, name, attrs):
        """Callback run at the start of each XML element"""

        self._contextStack.append(self._context)
        self._contentList = []

        if name in self._statusDict:
            self._itemTag, itemType = self._statusDict[name]
            self._progress.startItem(itemType)
        elif name == self._itemTag:
            self._error = False
            self._progress.newItem()

        try:
            if self._context == 'root':
                if name == 'xtvd':
                    self._context = 'xtvd'
                    self._startXTVDNode(name, attrs)
            elif self._context == 'xtvd':
                self._context = name
            elif self._context == 'stations':
                self._startStationsNode(name, attrs)
            elif self._context == 'lineups':
                self._startLineupsNode(name, attrs)
            elif self._context == 'schedules':
                self._startSchedulesNode(name, attrs)
            elif self._context == 'programs':
                self._startProgramsNode(name, attrs)
            elif self._context == 'productionCrew':
                self._startProductionCrewNode(name, attrs)
            elif self._context == 'genres':
                self._startGenresNode(name, attrs)
        except Exception, e:
            self._error = True
            self._progress.printMsg(str(e), error=True)