xml_obj_child = find_xml_node(xml_obj, "resource_group", FALSE);
xml_obj_child = find_xml_node(xml_obj, XML_CIB_TAG_GROUP, FALSE);
void incarnation_unpack(resource_t *rsc, pe_working_set_t *data_set){	int lpc = 0;	crm_data_t * xml_obj_child = NULL;	crm_data_t * xml_obj = rsc->xml;	crm_data_t * xml_self = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);	incarnation_variant_data_t *incarnation_data = NULL;	resource_t *self = NULL;	char *inc_max = NULL;	const char *ordered =		crm_element_value(xml_obj, XML_RSC_ATTR_ORDERED);	const char *interleave =		crm_element_value(xml_obj, XML_RSC_ATTR_INTERLEAVE);	const char *max_incarn =		get_rsc_param(rsc, XML_RSC_ATTR_INCARNATION_MAX);	const char *max_incarn_node =		get_rsc_param(rsc, XML_RSC_ATTR_INCARNATION_NODEMAX);	crm_debug_3("Processing resource %s...", rsc->id);	crm_malloc0(incarnation_data, sizeof(incarnation_variant_data_t));	incarnation_data->child_list           = NULL;	incarnation_data->interleave           = FALSE;	incarnation_data->ordered              = FALSE;	incarnation_data->active_incarnation   = 0;	incarnation_data->incarnation_max      = crm_atoi(max_incarn,     "1");	incarnation_data->incarnation_max_node = crm_atoi(max_incarn_node,"1");	/* this is a bit of a hack - but simplifies everything else */	copy_in_properties(xml_self, xml_obj);	xml_obj_child = find_xml_node(xml_obj, "resource_group", FALSE);	if(xml_obj_child == NULL) {		xml_obj_child = find_xml_node(			xml_obj, XML_CIB_TAG_RESOURCE, TRUE);	}	CRM_DEV_ASSERT(xml_obj_child != NULL);	if(crm_assert_failed) { return; }	xml_obj_child = copy_xml(xml_obj_child);		if(common_unpack(xml_self, &self, data_set)) {		incarnation_data->self = self;	} else {		crm_log_xml_err(xml_self, "Couldnt unpack dummy child");		return;	}	if(crm_is_true(interleave)) {		incarnation_data->interleave = TRUE;	}	if(crm_is_true(ordered)) {		incarnation_data->ordered = TRUE;	}	inherit_parent_attributes(xml_self, xml_obj_child, FALSE);	inc_max = crm_itoa(incarnation_data->incarnation_max);	for(lpc = 0; lpc < incarnation_data->incarnation_max; lpc++) {		resource_t *child_rsc = NULL;		crm_data_t * child_copy = copy_xml(xml_obj_child);				set_id(child_copy, rsc->id, lpc);				if(common_unpack(child_copy, &child_rsc, data_set)) {			char *inc_num = crm_itoa(lpc);						incarnation_data->child_list = g_list_append(				incarnation_data->child_list, child_rsc);						add_rsc_param(				child_rsc, XML_RSC_ATTR_INCARNATION, inc_num);			add_rsc_param(				child_rsc, XML_RSC_ATTR_INCARNATION_MAX, inc_max);						crm_action_debug_3(				print_resource("Added", child_rsc, FALSE));						crm_free(inc_num);					} else {			pe_err("Failed unpacking resource %s",			       crm_element_value(child_copy, XML_ATTR_ID));		}	}	crm_free(inc_max);	free_xml(xml_obj_child);		crm_debug_3("Added %d children to resource %s...",		    incarnation_data->incarnation_max, rsc->id);		rsc->variant_opaque = incarnation_data;}