| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

xml_attr_ic

#include "sflxml.h"
XML_ATTR *
xml_attr_ic (
    XML_ITEM   *item,
    const char *name,
    Bool        ignore_case)

Synopsis

Searches for the attribute with the specified name; if found, returns the address of the attribute node, otherwise returns NULL. If the paramater 'ignore_case' is TRUE, the case of the attribute name is insignificant.

Source Code - (sflxml.c)

{
    XML_ATTR
        *attr;

    ASSERT (item);
    ASSERT (name);

    if (ignore_case)
      {
        FORLIST (attr, item-> attrs)
            if (attr-> name ? lexcmp (attr-> name, name) == 0 : FALSE)
                return (attr);
      }
    else
      {
        FORLIST (attr, item-> attrs)
            if (attr-> name ? streq (attr-> name, name) : FALSE)
                return (attr);
      }
    return (NULL);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation