def fromXML(self, node):
        if node.nodeName != 'change':
            return None
        
        # read attributes
        id = self.convertFromStr(self.getAttribute(node, 'id'), 'long')
        what = self.convertFromStr(self.getAttribute(node, 'what'), 'str')
        oldObjId = self.convertFromStr(self.getAttribute(node, 'oldObjId'), 'long')
        newObjId = self.convertFromStr(self.getAttribute(node, 'newObjId'), 'long')
        parentObjId = self.convertFromStr(self.getAttribute(node, 'parentObjId'), 'long')
        parentObjType = self.convertFromStr(self.getAttribute(node, 'parentObjType'), 'str')
        
        data = None
        
        # read children
        for child in list(node.childNodes):
            if child.nodeName == 'module':
                data = self.getDao('module').fromXML(child)
            elif child.nodeName == 'location':
                data = self.getDao('location').fromXML(child)
            elif child.nodeName == 'annotation':
                data = self.getDao('annotation').fromXML(child)
            elif child.nodeName == 'function':
                data = self.getDao('function').fromXML(child)
            elif child.nodeName == 'connection':
                data = self.getDao('connection').fromXML(child)
            elif child.nodeName == 'port':
                data = self.getDao('port').fromXML(child)
            elif child.nodeName == 'parameter':
                data = self.getDao('parameter').fromXML(child)
            elif child.nodeName == 'portSpec':
                data = self.getDao('portSpec').fromXML(child)
            elif child.nodeName == 'abstractionRef':
                data = self.getDao('abstractionRef').fromXML(child)
            elif child.nodeName == 'other':
                data = self.getDao('other').fromXML(child)
            elif child.nodeType == child.TEXT_NODE and child.nodeValue.strip() == '':
                # node.removeChild(child)
                pass
            elif child.nodeType != child.TEXT_NODE:
                print '*** ERROR *** nodeName = %s' % child.nodeName
        
        obj = DBChange(id=id,
                       what=what,
                       oldObjId=oldObjId,
                       newObjId=newObjId,
                       parentObjId=parentObjId,
                       parentObjType=parentObjType,
                       data=data)
        obj.is_dirty = False
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_6_0/persistence/xml/auto_gen.py/DBChangeXMLDAOBase.fromXML/original