def _parse_var(self, element):
        """
        Parse a variable assignment
        :param element: The XML Element object
        :type  element: etree._Element
        """
        syntax = 'attribute' if element.get('name') else 'element'

        var_type = attribute(element, 'type', 'user')
        if syntax == 'attribute':
            var_name  = attribute(element, 'name')
            var_value   = self.agentml.parse_tags(element, self.trigger) if len(element) else element.text
        else:
            name_etree = element.find('name')
            var_name   = self.agentml.parse_tags(name_etree, self.trigger) if len(name_etree) else name_etree.text

            value_etree = element.find('value')
            var_value = self.agentml.parse_tags(value_etree, self.trigger) if len(value_etree) else value_etree.text

        self.vars.append((var_type, var_name, var_value))