def fromXML(self, node):
        if node.nodeName != 'function':
            return None
        
        parameters = []
        
        # read attributes
        id = self.convertFromStr(self.getAttribute(node, 'id'), 'long')
        pos = self.convertFromStr(self.getAttribute(node, 'pos'), 'long')
        name = self.convertFromStr(self.getAttribute(node, 'name'), 'str')
        
        
        # read children
        for child in list(node.childNodes):
            if child.nodeName == 'parameter':
                parameter = self.getDao('parameter').fromXML(child)
                parameters.append(parameter)
            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 = DBFunction(id=id,
                         pos=pos,
                         name=name,
                         parameters=parameters)
        obj.is_dirty = False
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_6_0/persistence/xml/auto_gen.py/DBFunctionXMLDAOBase.fromXML/original