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

 

xml_new

#include "sflxml.h"
XML_ITEM *
xml_new (
    XML_ITEM   *parent,
    const char *name,
    const char *value)

Synopsis

Creates and initialises a new XML_ITEM item with a specified parent item. Returns the address of the created XML_ITEM item or NULL if there was not enough memory. Sets the new item's name and value as specified; only one of these should contain a value, although sflxml will not complain if both do. If the name is non-NULL this is a child node; if the value is non-NULL then this is a value node. If the parent argument is non-NULL, attaches the new item to the end of the parent item list.

Source Code - (sflxml.c)

{
    XML_ITEM
        *item;

    item = xml create (name, value);
    if (item && parent)
        xml attach child (parent, item);

    return item;
}

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