| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

xml_load_file

#include "sflxmll.h"
int
xml_load_file (XML_ITEM  **item,
               const char *path,
               const char *filename,
               Bool allow_extended)

Synopsis

Loads the contents of an XML file into a given XML tree, or a new XML tree if none was specified. The XML data is not checked against a DTD. Returns one of XML_NOERROR, XML_FILEERROR, XML_LOADERROR. If the parameter `allow_extended' is TRUE then the file may contain more than one XML item. The following attributes are defined in the root item of the XML tree.
filename Name of the XML input file
filetime Modification time of the file, "HHMMSSCC"
filedate Modification date of input file, "YYYYMMDD"
Looks for the XML file on the specified path symbol, or in the current directory if the path argument is null. Adds the extension ".xml" to the file name if there is none already included.

Source Code - (sflxmll.c)

{
    ASSERT (filename);
    pname = filename;
    ppath = path;

    extended = allow_extended;

    if (! *item)
      {
        *item = xml new (NULL, "root", "");
        ASSERT (*item);
      }
    root = *item;

    /*  Current line w/space for EOL                                         */
    xmlline = mem_alloc (LINE_MAX + 2);

    line_nbr = 0;

    the_next_event = file_event;

    xml_start_dialog ();
    mem_free (xmlline);
    return (feedback);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation