| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflxml.h" XML_ITEM * xml_create ( const char *name, const char *value)
Creates and initialises a new XML_ITEM 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.
{ XML_ITEM *item; list_create (item, sizeof (XML_ITEM)); if (item) { list_reset (&item-> attrs); list_reset (&item-> children); item-> parent = NULL; item-> name = mem_strdup (name); item-> value = mem_strdup (value); return (item); } else return (NULL); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |