def fromXML(self, node):
        if node.nodeName != 'action':
            return None
        
        operations = []
        
        annotations = {}
        
        # read attributes
        id = self.convertFromStr(self.getAttribute(node, 'id'), 'long')
        prevId = self.convertFromStr(self.getAttribute(node, 'prevId'), 'long')
        date = self.convertFromStr(self.getAttribute(node, 'date'), 'datetime')
        user = self.convertFromStr(self.getAttribute(node, 'user'), 'str')
        
        
        # read children
        for child in list(node.childNodes):
            if child.nodeName == 'annotation':
                annotation = self.getDao('annotation').fromXML(child)
                annotations[annotation.db_id] = annotation
            elif child.nodeName == 'add':
                operation = self.getDao('add').fromXML(child)
                operations.append(operation)
            elif child.nodeName == 'delete':
                operation = self.getDao('delete').fromXML(child)
                operations.append(operation)
            elif child.nodeName == 'change':
                operation = self.getDao('change').fromXML(child)
                operations.append(operation)
            elif child.nodeType == child.TEXT_NODE and child.nodeValue.strip() == '':
                # node.removeChild(child)
                pass
            elif child.nodeType != child.TEXT_NODE:
                print child.nodeName % '*** ERROR *** nodeName = %s'
        
        obj = DBAction(id=id,
                       prevId=prevId,
                       date=date,
                       user=user,
                       annotations=annotations,
                       operations=operations)
        obj.is_dirty = False
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_6_0/persistence/xml/auto_gen.py/DBActionXMLDAOBase.fromXML/swapped operands of `%`