b413e176bc86b862eb13a5e2248e11dc5368078a
[idzebra-moved-to-github.git] / recctrl / xmlread.c
1 /*
2  * Copyright (C) 1994-2002, Index Data
3  * All rights reserved.
4  *
5  * $Id: xmlread.c,v 1.1 2002-05-13 14:13:43 adam Exp $
6  */
7
8 #if YAZ_HAVE_EXPAT
9
10 #include <assert.h>
11 #include <yaz/log.h>
12
13 #include "grsread.h"
14
15 struct xml_info {
16     int dummy;
17 };
18
19 static void *grs_init_xml(void)
20 {
21     struct xml_info *p = (struct xml_info *) xmalloc (sizeof(*p));
22     return p;
23 }
24
25 static data1_node *grs_read_xml (struct grs_read_info *p)
26 {
27     return data1_read_xml (p->dh, p->readf, p->fh, p->mem);
28 }
29
30 static void grs_destroy_xml(void *clientData)
31 {
32     struct sgml_getc_info *p = (struct sgml_getc_info *) clientData;
33
34     xfree (p);
35 }
36
37 static struct recTypeGrs xml_type = {
38     "xml",
39     grs_init_xml,
40     grs_destroy_xml,
41     grs_read_xml
42 };
43
44 RecTypeGrs recTypeGrs_xml = &xml_type;
45
46 #endif