2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #define XMLBUFSIZE 8192
28 typedef struct _XMLAttr XMLAttr;
29 typedef struct _XMLTag XMLTag;
30 typedef struct _XMLNode XMLNode;
31 typedef struct _XMLFile XMLFile;
64 gboolean is_empty_element;
67 XMLFile *xml_open_file (const gchar *path);
68 void xml_close_file (XMLFile *file);
69 GNode *xml_parse_file (const gchar *path);
71 gint xml_get_dtd (XMLFile *file);
72 gint xml_parse_next_tag (XMLFile *file);
73 void xml_push_tag (XMLFile *file,
75 void xml_pop_tag (XMLFile *file);
77 XMLTag *xml_get_current_tag (XMLFile *file);
78 GList *xml_get_current_tag_attr(XMLFile *file);
79 gchar *xml_get_element (XMLFile *file);
81 gint xml_read_line (XMLFile *file);
82 void xml_truncate_buf (XMLFile *file);
83 gboolean xml_compare_tag (XMLFile *file,
86 XMLNode *xml_node_new (XMLTag *tag,
89 XMLTag *xml_tag_new (const gchar *tag);
90 XMLAttr *xml_attr_new (const gchar *name,
92 XMLAttr *xml_attr_new_int (const gchar *name,
94 void xml_tag_add_attr (XMLTag *tag,
97 XMLTag *xml_copy_tag (XMLTag *tag);
98 XMLAttr *xml_copy_attr (XMLAttr *attr);
100 gint xml_unescape_str (gchar *str);
101 gint xml_file_put_escape_str (FILE *fp,
104 gint xml_file_put_xml_decl (FILE *fp);
105 gint xml_file_put_node (FILE *fp,
108 void xml_free_node (XMLNode *node);
109 void xml_free_tree (GNode *node);
111 void xml_free_tag (XMLTag *tag);
112 void xml_write_tree (GNode *node,
114 GNode *xml_copy_tree (GNode *node);
116 #endif /* __XML_H__ */