while(xml_nodes != NULL) { xml_obj = xml_nodes;
xml_child_iter( xml_nodes, xml_obj, XML_CIB_TAG_NODE,
unpack_nodes(xmlNodePtr xml_nodes, GListPtr *nodes){	node_t *new_node   = NULL;	xmlNodePtr xml_obj = NULL;	xmlNodePtr attrs   = NULL;	const char *id     = NULL;	const char *uname  = NULL;	const char *type   = NULL;	crm_verbose("Begining unpack...");	while(xml_nodes != NULL) {		xml_obj = xml_nodes;		attrs   = xml_obj->children;		id     = xmlGetProp(xml_obj, XML_ATTR_ID);		uname  = xmlGetProp(xml_obj, XML_ATTR_UNAME);		type   = xmlGetProp(xml_obj, XML_ATTR_TYPE);		crm_verbose("Processing node %s", id);		if(attrs != NULL) {			attrs = attrs->children;		}				xml_nodes = xml_nodes->next;			if(id == NULL) {			crm_err("Must specify id tag in <node>");			continue;		}		if(type == NULL) {			crm_err("Must specify type tag in <node>");			continue;		}		new_node  = crm_malloc(sizeof(node_t));		new_node->weight  = 1.0;		new_node->fixed   = FALSE;		new_node->details = (struct node_shared_s*)			crm_malloc(sizeof(struct node_shared_s));		new_node->details->id		= id;		new_node->details->uname	= uname;		new_node->details->type		= node_ping;		new_node->details->online	= FALSE;		new_node->details->unclean	= FALSE;		new_node->details->shutdown	= FALSE;		new_node->details->running_rsc	= NULL;		new_node->details->agents	= NULL;		new_node->details->attrs	= g_hash_table_new(			g_str_hash, g_str_equal);		if(safe_str_eq(type, "member")) {			new_node->details->type = node_member;		}		add_node_attrs(attrs, new_node);		*nodes = g_list_append(*nodes, new_node);    		crm_verbose("Done with node %s", xmlGetProp(xml_obj, "uname"));		crm_debug_action(print_node("Added", new_node, FALSE));	}  	*nodes = g_list_sort(*nodes, sort_node_weight);	return TRUE;}