]> git.sur5r.net Git - glabels/blob - glabels2/libglabels/xml.h
2004-01-06 Jim Evins <evins@snaught.com>
[glabels] / glabels2 / libglabels / xml.h
1 /*
2  *  (LIBGLABELS) Template library for GLABELS
3  *
4  *  xml.h:  GLabels xml utilities header file
5  *
6  *  Copyright (C) 2003, 2004  Jim Evins <evins@snaught.com>.
7  *
8  *  This file is part of the LIBGLABELS library.
9  *
10  *  This library is free software; you can redistribute it and/or
11  *  modify it under the terms of the GNU Library General Public
12  *  License as published by the Free Software Foundation; either
13  *  version 2 of the License, or (at your option) any later version.
14  *
15  *  This library is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  *  Library General Public License for more details.
19  *
20  *  You should have received a copy of the GNU Library General Public
21  *  License along with this library; if not, write to the Free
22  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23  *  MA 02111-1307, USA
24  */
25
26 #ifndef __XML_H__
27 #define __XML_H__
28
29 #include <glib.h>
30 #include <libxml/tree.h>
31
32 #define GL_XML_NAME_SPACE "http://snaught.com/glabels/2.0/"
33
34 G_BEGIN_DECLS
35
36 gdouble  gl_xml_get_prop_double   (xmlNodePtr    node,
37                                    const gchar  *property,
38                                    gdouble       default_val);
39
40 gboolean gl_xml_get_prop_boolean  (xmlNodePtr    node,
41                                    const gchar  *property,
42                                    gboolean      default_val);
43
44 gint     gl_xml_get_prop_int      (xmlNodePtr    node,
45                                    const gchar  *property,
46                                    gint          default_val);
47
48 guint    gl_xml_get_prop_uint     (xmlNodePtr    node,
49                                    const gchar  *property,
50                                    guint         default_val);
51
52 gdouble  gl_xml_get_prop_length   (xmlNodePtr    node,
53                                    const gchar  *property,
54                                    gdouble       default_val);
55
56
57 void     gl_xml_set_prop_double   (xmlNodePtr    node,
58                                    const gchar  *property,
59                                    gdouble       val);
60
61 void     gl_xml_set_prop_boolean  (xmlNodePtr    node,
62                                    const gchar  *property,
63                                    gboolean      val);
64
65 void     gl_xml_set_prop_int      (xmlNodePtr    node,
66                                    const gchar  *property,
67                                    gint          val);
68
69 void     gl_xml_set_prop_uint_hex (xmlNodePtr    node,
70                                    const gchar  *property,
71                                    guint         val);
72
73 void     gl_xml_set_prop_length   (xmlNodePtr    node,
74                                    const gchar  *property,
75                                    gdouble       val);
76
77 G_END_DECLS
78
79
80 #endif /* __XML_H__ */