| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#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; int rc; ASSERT (item); 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 */ rc = xml load (item, pathsym, filename); mem_free (pathsym); mem_free (filename); return (rc == XML_NOERROR); } return (FALSE); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |