const char *node_name, const char *elem_filter_name, const char *elem_filter_value, const char *id, gboolean siblings) 
const char *node_name, const char *elem_filter_name, const char *elem_filter_value, const char *id, gboolean siblings) 
find_entity_nested(xmlNodePtr parent,				   const char *node_name,				   const char *elem_filter_name,				   const char *elem_filter_value,				   const char *id,				   gboolean siblings){    /* debug tools:	 * xmlChar *	xmlGetNodePath		(xmlNodePtr node);	 * long		xmlGetLineNo		(xmlNodePtr node);	 */    xmlNodePtr child;	FNIN();    cl_log(LOG_DEBUG, "Looking for %s elem with id=%s.", node_name, id);    while(parent != NULL) {		CRM_DEBUG2("examining (%s).", xmlGetNodePath(parent));		child = parent->children;			while(child != NULL) {			CRM_DEBUG2("looking for (%s) [name].", node_name);			if (node_name != NULL && strcmp(child->name, node_name) != 0) {    				CRM_DEBUG3("skipping entity (%s=%s) [node_name].",						   xmlGetNodePath(child), child->name);				break;			} else if (elem_filter_name != NULL && elem_filter_value != NULL) {				const char* child_value = (const char*)					xmlGetProp(child, elem_filter_name);								cl_log(LOG_DEBUG, "comparing (%s) with (%s) [attr_value].",					   child_value, elem_filter_value);				if (strcmp(child_value, elem_filter_value)) {					CRM_DEBUG2("skipping entity (%s) [attr_value].",							   xmlGetNodePath(child));					break;				}			}		//	    cl_log(LOG_DEBUG, "looking for entity (%s) in %s.", id, xmlGetNodePath(child));			while(child != NULL) {				cl_log(LOG_DEBUG, "looking for entity (%s) in %s.",					   id, xmlGetNodePath(child));				xmlChar *child_id = xmlGetProp(child, "id");				if (child_id == NULL) {					cl_log(LOG_CRIT,						   "Entity (%s) has id=NULL... Cib not valid!",						   xmlGetNodePath(child));				} else if (strcmp(id, child_id) == 0) {					CRM_DEBUG2("found entity (%s).", id);					FNRET(child);				}   				child = child->next;			}		}		if (siblings == TRUE) {			CRM_DEBUG("Nothing yet... checking siblings");	    			parent = parent->next;		} else			parent = NULL;    }    CRM_DEBUG("Couldnt find anything appropriate");	    	FNRET(NULL);}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/1527bd277bea88314ec7c1fafa964969da82ef38/xmlutils.c/buggy/crm/common/xmlutils.c