agent->class   = xmlGetProp(xml_agent, XML_AGENT_ATTR_CLASS); agent->type    = xmlGetProp(xml_agent, XML_ATTR_TYPE); version        = xmlGetProp(xml_agent, XML_ATTR_VERSION);
agent->class   = crm_element_value(xml_agent, XML_AGENT_ATTR_CLASS); agent->type    = crm_element_value(xml_agent, XML_ATTR_TYPE); version        = crm_element_value(xml_agent, XML_ATTR_VERSION);
unpack_lrm_agents(node_t *node, xmlNodePtr agent_list){	/* if the agent is not listed, remove the node from	 * the resource's list of allowed_nodes	 */	lrm_agent_t *agent   = NULL;	const char *version  = NULL;	if(agent_list == NULL) {		return FALSE;	}	xml_child_iter(		agent_list, xml_agent, XML_LRM_TAG_AGENT,		crm_malloc(agent, sizeof(lrm_agent_t));		if(agent == NULL) {			continue;		}				agent->class   = xmlGetProp(xml_agent, XML_AGENT_ATTR_CLASS);		agent->type    = xmlGetProp(xml_agent, XML_ATTR_TYPE);		version        = xmlGetProp(xml_agent, XML_ATTR_VERSION);		agent->version = version?version:"0.0";		crm_trace("Adding agent %s/%s v%s to node %s",			  agent->class,			  agent->type,			  agent->version,			  node->details->uname);			  		node->details->agents = g_list_append(			node->details->agents, agent);		);		return TRUE;}