CRM_DEBUG2("looking for (%s) [name].", node_name);
CRM_DEBUG("looking for (%s) [name].", node_name);
find_entity_nested(xmlNodePtr parent,		   const char *node_name,		   const char *elem_filter_name,		   const char *elem_filter_value,		   const char *id,		   gboolean siblings){	xmlNodePtr child;	FNIN();#ifdef XML_TRACE	cl_log(LOG_DEBUG, "Looking for %s elem with id=%s.", node_name, id);#endif	while(parent != NULL) {#ifdef XML_TRACE		CRM_DEBUG2("examining (%s).", xmlGetNodePath(parent));#endif		child = parent->children;			while(child != NULL) {#ifdef XML_TRACE			CRM_DEBUG2("looking for (%s) [name].", node_name);#endif			if (node_name != NULL			    && strcmp(child->name, node_name) != 0) {    #ifdef XML_TRACE				CRM_DEBUG3(					"skipping entity (%s=%s) [node_name].",					xmlGetNodePath(child), child->name);#endif				break;			} else if (elem_filter_name != NULL				   && elem_filter_value != NULL) {				const char* child_value = (const char*)					xmlGetProp(child, elem_filter_name);				#ifdef XML_TRACE				cl_log(LOG_DEBUG,				       "comparing (%s) with (%s) [attr_value].",				       child_value, elem_filter_value);#endif				if (strcmp(child_value, elem_filter_value)) {#ifdef XML_TRACE					CRM_DEBUG2("skipping entity (%s) [attr_value].",						   xmlGetNodePath(child));#endif					break;				}			}		#ifdef XML_TRACE			cl_log(LOG_DEBUG,			       "looking for entity (%s) in %s.",			       id, xmlGetNodePath(child));#endif			while(child != NULL) {#ifdef XML_TRACE				cl_log(LOG_DEBUG,				       "looking for entity (%s) in %s.",				       id, xmlGetNodePath(child));#endif				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) {#ifdef XML_TRACE					CRM_DEBUG2("found entity (%s).", id);#endif					FNRET(child);				}   				child = child->next;			}		}		if (siblings == TRUE) {#ifdef XML_TRACE			CRM_DEBUG("Nothing yet... checking siblings");	    #endif			parent = parent->next;		} else			parent = NULL;	}	cl_log(LOG_INFO,	       "Couldnt find anything appropriate for %s elem with id=%s.",	       node_name, id);	    	FNRET(NULL);}