scew_bool scew_attribute_compare (scew_attribute const *a, scew_attribute const *b) { assert (a != NULL); assert (b != NULL); return (scew_strcmp (a->name, b->name) == 0) && (scew_strcmp (a->value, b->value) == 0); }
scew_attribute* attribute_by_name(attribute_list* list, XML_Char const* name) { scew_attribute* attribute = NULL; assert(list != NULL); if (name == NULL) { return NULL; } attribute = list->first; while (attribute && scew_strcmp(attribute->name, name)) { attribute = attribute->next; } return attribute; }
scew_element* scew_element_by_name(scew_element const* parent, XML_Char const* name) { scew_element* element = NULL; assert(parent != NULL); if (name == NULL) { return NULL; } element = scew_element_next(parent, 0); while (element && scew_strcmp(element->name, name)) { element = scew_element_next(parent, element); } return element; }
scew_bool cmp_name_ (void const *element, void const *name) { return (scew_strcmp (((scew_element *) element)->name, (XML_Char *) name) == 0); }