xml_text = dump_xml_formatted(root);
xml_text = dump_xml_unformatted(root);
send_xmlha_message(ll_cluster_t *hb_fd, xmlNodePtr root){	int xml_len          = -1;	int send_result      = -1;	char *xml_text       = NULL;	const char *host_to  = NULL;	const char *sys_to   = NULL;	struct ha_msg *msg   = NULL;	gboolean all_is_good = TRUE;	gboolean broadcast   = FALSE;	int log_level        = LOG_DEBUG;	xmlNodePtr opts = find_xml_node(root, XML_TAG_OPTIONS);	const char *op  = xmlGetProp(opts, XML_ATTR_OP);#ifdef MSG_LOG	char *msg_text = NULL;#endif	    	if (root == NULL) {		crm_err("Attempt to send NULL Message via HA failed.");		all_is_good = FALSE;	}	host_to = xmlGetProp(root, XML_ATTR_HOSTTO);	sys_to = xmlGetProp(root, XML_ATTR_SYSTO);		if (all_is_good) {		msg = ha_msg_new(4); 		ha_msg_add(msg, F_TYPE, "CRM");		ha_msg_add(msg, F_COMMENT, "A CRM xml message");		xml_text = dump_xml_formatted(root);		xml_len = strlen(xml_text);				if (xml_text == NULL || xml_len <= 0) {			crm_err(			       "Failed sending an invalid XML Message via HA");			all_is_good = FALSE;			print_xml_formatted(root, "Bad message was");					} else {			if(ha_msg_add(msg, "xml", xml_text) == HA_FAIL) {				crm_err("Could not add xml to HA message");				all_is_good = FALSE;			}		}	}	if (all_is_good) {		if (sys_to == NULL || strlen(sys_to) == 0)		{			crm_err("You did not specify a destination sub-system"				" for this message.");			all_is_good = FALSE;		}	}	/* There are a number of messages may not need to be ordered.	 * At a later point perhaps we should detect them and send them	 *  as unordered messages.	 */	if (all_is_good) {		if (host_to == NULL		    || strlen(host_to) == 0) {			broadcast = TRUE;			send_result =				hb_fd->llc_ops->sendclustermsg(hb_fd, msg);		}		else {			send_result = hb_fd->llc_ops->send_ordered_nodemsg(				hb_fd, msg, host_to);		}				if(send_result != HA_OK)			all_is_good = FALSE;	}		if(all_is_good == FALSE) {		log_level = LOG_ERR;	}	if(log_level == LOG_ERR	   || (safe_str_neq(op, CRM_OP_HBEAT))) {		do_crm_log(log_level, __FUNCTION__, 		       "Sending %s HA message (ref=%s, len=%d) to %s@%s %s.",		       broadcast?"broadcast":"directed",		       xmlGetProp(root, XML_ATTR_REFERENCE), xml_len,		       sys_to, host_to==NULL?"<all>":host_to,		       all_is_good?"succeeded":"failed");	}	#ifdef MSG_LOG	msg_text = dump_xml_formatted(root);	if(msg_out_strm == NULL) {		msg_out_strm = fopen(DEVEL_DIR"/outbound.log", "w");	}	fprintf(msg_out_strm, "[%s HA (%s:%d)]\t%s\n",		all_is_good?"succeeded":"failed",		xmlGetProp(root, XML_ATTR_REFERENCE),		send_result,		msg_text);		fflush(msg_out_strm);	crm_free(msg_text);	if(msg != NULL) {		ha_msg_del(msg);	}#endif			return all_is_good;}