 if(input == NULL) { cl_log(LOG_ERR, "File pointer was NULL"); return NULL; } 
file2xml(FILE *input){	char ch = 0;	gboolean more = TRUE;	gboolean inTag = FALSE;	xmlBufferPtr xml_buffer = xmlBufferCreate();		while (more) {		ch = fgetc(input);//		cl_log(LOG_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;		}	}		xmlNodePtr xml_object = NULL;	const char *the_xml = xmlBufferContent(xml_buffer);	xmlDocPtr doc = xmlParseMemory(the_xml, strlen(the_xml));	if (doc == NULL) {		cl_log(LOG_ERR, "Malformed XML [xml=%s]", the_xml);		return NULL;	}	xml_object = xmlDocGetRootElement(doc);	xml_message_debug(xml_object, "Created fragment");	return xml_object;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/8b3bdcd3f4e7e4db201a80b198d3caf608193791/xmlutils.c/buggy/crm/common/xmlutils.c