XMLAPI void xml_prepend (XML * parent, XML * child)
{
ELEMENTLIST * list;
child->parent = parent;
list = (ELEMENTLIST *) MALLOC (sizeof(struct _list));
list->element = child;
list->prev = NULL;
list->next = parent->children;
if (list->next) list->next->prev = list;
if (parent->children == NULL) {
parent->lastchild = list;
}
parent->children = list;
}
|
| This code and documentation are released under the terms of the GNU license. They are copyright (c) 2000-2003, Vivtek. All rights reserved except those explicitly granted under the terms of the GNU license. This presentation was created using LPML. |