| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflxmll.h" int xml_save_file ( XML_ITEM *item, const char *filename)
Saves an XML tree to the specified file. Returns XML_NOERROR or XML_FILEERROR.
{ FILE *xmlfile; /* XML output stream */ int count; /* How many symbols did we save? */ ASSERT (item); ASSERT (filename); init_charmaps (); /* Initialise character maps */ if ((xmlfile = file open (filename, 'w')) == NULL) return XML_FILEERROR; /* No permission to write file */ /* Write XML file header */ fprintf (xmlfile, "<?xml version=\"1.0\"?>\n"); /* Output XML root */ count = xml_save_file_item (xmlfile, item, 0); /* Output a final carriage return */ fprintf (xmlfile, "\n"); file close (xmlfile); return XML_NOERROR; }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |