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

 

xml_free

#include "sflxml.h"
void
xml_free (
    XML_ITEM *item)

Synopsis

Frees all memory used by an XML_ITEM item and its children.

Source Code - (sflxml.c)

{
    ASSERT (item);

    /*  Free attribute nodes for the item                                    */
    while (!list_empty (&item-> attrs))
        xml free attr (item-> attrs.next);

    /*  Free child nodes for the item                                        */
    while (!list_empty (&item-> children))
        xml free (item-> children.next);

    /*  Now free this item itself                                            */
    list unlink (item);                 /*  Unlink from its parent list      */
    mem_free (item-> name);             /*  Free strings, if not null        */
    mem_free (item-> value);
    mem_free (item);                    /*  And free the item itself         */
}

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