GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
io-gncxml-gen.c
1 /********************************************************************\
2  * gnc-xml-gen.c -- implementation for gnucash xml i/o *
3  * *
4  * Copyright (C) 2001 James LewisMoss <[email protected]> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA [email protected] *
22  * *
23 \********************************************************************/
24 
25 #include "config.h"
26 
27 #include "io-gncxml-gen.h"
28 
29 gboolean
30 gnc_xml_parse_file(sixtp *top_parser, const char *filename,
31  gxpf_callback callback, gpointer parsedata,
32  gpointer bookdata)
33 {
34  gpointer parse_result = NULL;
35  gxpf_data gpdata;
36 
37  gpdata.cb = callback;
38  gpdata.parsedata = parsedata;
39  gpdata.bookdata = bookdata;
40 
41  return sixtp_parse_file(top_parser, filename,
42  NULL, &gpdata, &parse_result);
43 }
44 
45 gboolean
46 gnc_xml_parse_fd(sixtp *top_parser, FILE *fd,
47  gxpf_callback callback, gpointer parsedata,
48  gpointer bookdata)
49 {
50  gpointer parse_result = NULL;
51  gxpf_data gpdata;
52 
53  gpdata.cb = callback;
54  gpdata.parsedata = parsedata;
55  gpdata.bookdata = bookdata;
56 
57  return sixtp_parse_fd(top_parser, fd,
58  NULL, &gpdata, &parse_result);
59 }
Definition: sixtp.h:93