xmlNodePtr dest = findEntity(res, XML_CIB_TAG_NVPAIR, id, FALSE);
xmlNodePtr dest = find_entity(res, XML_CIB_TAG_NVPAIR, id, FALSE);
updateConstraint(xmlNodePtr cib, cibConstraint *anXmlNode){    CRM_DEBUG2("Updating " XML_CIB_TAG_CONSTRAINT " (%s)...", ID(anXmlNode));    xmlNodePtr res = findConstraint(cib, ID(anXmlNode));    if(res == NULL)    {	CRM_DEBUG2("Update: " XML_CIB_TAG_CONSTRAINT " (%s) did not exist, adding.", ID(anXmlNode));	addConstraint(cib, anXmlNode);    }    else    {	//need to call?? xmlFreeNodeList();#ifdef REPLACE	xmlReplaceNode(res, anXmlNode);#else	copyInProperties(anXmlNode, res);		CRM_DEBUG2("Update: Copying in children for " XML_CIB_TAG_CONSTRAINT " (%s).", ID(anXmlNode));	xmlNodePtr iter = anXmlNode->children;	while(iter != NULL)	{	    if(strcmp(XML_CIB_TAG_NVPAIR, iter->name) == 0)	    {		const char *action = xmlGetProp(iter, XML_CIB_ATTR_ACTION);		const char *id = ID(iter);		xmlNodePtr dest = findEntity(res, XML_CIB_TAG_NVPAIR, id, FALSE);				if(dest != NULL) xmlUnlinkNode(dest);		if(strcmp("add", action) == 0)		{		    xmlUnsetProp(iter, XML_CIB_ATTR_ACTION); // remove the action property		    xmlAddChild(res, iter);		}	    }	}#endif    }    FNRET(0);}