xmlNodePtr xml_object = NULL;
crm_data_t *xml_object = NULL;
file2xml(FILE *input){	char ch = 0;	gboolean more = TRUE;	gboolean inTag = FALSE;	xmlNodePtr xml_object = NULL;	xmlBufferPtr xml_buffer = xmlBufferCreate();	const char *the_xml;	xmlDocPtr doc;	if(input == NULL) {		crm_err("File pointer was NULL");		return NULL;	}		while (more) {		ch = fgetc(input);/* 		crm_debug("Got [%c]", ch); */		switch(ch) {			case EOF: 			case 0:				ch = 0;				more = FALSE; 				xmlBufferAdd(xml_buffer, &ch, 1);				break;			case '>':			case '<':				inTag = TRUE;				if(ch == '>') inTag = FALSE;				xmlBufferAdd(xml_buffer, &ch, 1);				break;			case '\n':			case '\t':			case ' ':				ch = ' ';				if(inTag) {					xmlBufferAdd(xml_buffer, &ch, 1);				} 				break;			default:				xmlBufferAdd(xml_buffer, &ch, 1);				break;		}	}	xmlInitParser();	the_xml = xmlBufferContent(xml_buffer);	doc = xmlParseMemory(the_xml, strlen(the_xml));	xmlCleanupParser();		if (doc == NULL) {		crm_err("Malformed XML [xml=%s]", the_xml);		xmlBufferFree(xml_buffer);		return NULL;	}	xmlBufferFree(xml_buffer);	xml_object = xmlDocGetRootElement(doc);	crm_xml_devel(xml_object, "Created fragment");	return xml_object;}