testxml.c

来自「短小精悍的C语言标准函数库。提供450个以上的可移植的算法和工具代码。」· C语言 代码 · 共 38 行

C
38
字号
/*  ----------------------------------------------------------------<Prolog>-
    Name:       testxml.c
    Title:      Test program for XML functions
    Package:    Standard Function Library (SFL)

    Written:    1998/03/23  iMatix SFL project team <sfl@imatix.com>
    Revised:    1999/06/21

    Synopsis:   Test XML loading and saving.

    Copyright:  Copyright (c) 1996-2000 iMatix Corporation
    License:    This is free software; you can redistribute it and/or modify
                it under the terms of the SFL License Agreement as provided
                in the file LICENSE.TXT.  This software is distributed in
                the hope that it will be useful, but without any warranty.
 ------------------------------------------------------------------</Prolog>-*/

#include "sfl.h"

int main (int argc, char *argv [])
{
    XML_ITEM
        *root;

    root = xml_new (NULL, "root", "");
    if (xml_load_file (&root, ".", argv[1], TRUE))
      {
        xml_save_file (root, "testxml.txt");
        xml_free      (root);
      }
    else
        printf ("Load error: %s\n", xml_error ());

    mem_assert ();
    return (EXIT_SUCCESS);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?