if(attr_name || strlen(attr_name) == 0) { cl_log(LOG_ERR, "Can not set attribute with no name");
if(attr_name == NULL || strlen(attr_name) == 0) { cl_log(LOG_ERR, "Can not set attribute to %s with no name", attr_value);
set_xml_attr_nested(xmlNodePtr parent,		    const char **node_path, int length,		    const char *attr_name,		    const char *attr_value,		    gboolean create){	xmlAttrPtr result        = NULL;	xmlNodePtr attr_parent   = NULL;	xmlNodePtr create_parent = NULL;		if(parent == NULL && create == FALSE) {		cl_log(LOG_ERR, "Can not set attribute in NULL parent");		return NULL;	} 	if(attr_name || strlen(attr_name) == 0) {		cl_log(LOG_ERR, "Can not set attribute with no name");		return NULL;	}	if(length == 0 && parent != NULL) {		attr_parent = parent;	} else if(length == 0 || node_path == NULL		  || *node_path == NULL || strlen(*node_path) == 0) {		cl_log(LOG_ERR, "Can not create parent to set attribute on");		return NULL;			} else {		attr_parent = find_xml_node_nested(parent, node_path, length);	}		if(create && attr_parent == NULL) {		int j = 0;		attr_parent = parent;		for (j=0; j < length; ++j) {			if (node_path[j] == NULL) {				break;			}						xmlNodePtr tmp =				find_xml_node(attr_parent, node_path[j]);			if(tmp == NULL) {				attr_parent = create_xml_node(attr_parent,							      node_path[j]);				if(j==0) {					create_parent = attr_parent;				}							} else {				attr_parent = tmp;			}		}			} else if(attr_parent == NULL) {		cl_log(LOG_ERR, "Can not find parent to set attribute on");		return NULL;			}		result = set_xml_property_copy(attr_parent, attr_name, attr_value);	if(result == NULL) {		cl_log(LOG_WARNING,		       "Could not set %s=%s at %s",		       attr_name, attr_value, xmlGetNodePath(attr_parent));	}	if(create_parent != NULL) {		return create_parent;	}		return parent;}