| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sflxml.h" Bool xml_refresh ( XML_ITEM *item)
Refreshes an XML tree created by xml load (). If the original file (as specified by the 'filename' attribute of the root item) has been modified, reloads the whole XML file. Returns TRUE if the XML file was actually reloaded, or FALSE if the file had not changed or could not be accessed, or if the XML tree was incorrectly created.
{ char *filename, *pathsym; ASSERT (item); if (xml changed (item)) { pathsym = mem_strdup (xml get attr (item, "pathsym", NULL)); filename = mem_strdup (xml get attr (item, "filename", NULL)); xml free (item); /* Delete previous XML tree */ xml load (pathsym, filename); mem_free (pathsym); mem_free (filename); return (TRUE); } return (FALSE); }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |