I#27 - [IMAPx] Ignore DavMail's CR/LF in BODYSTRUCTURE response
[evolution-data-server.git] / src / libedataserver / e-xml-utils.h
blob41bb70abcc95b0a6edcbec7b619d9002f53991af
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5 * This library is free software: you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12 * for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
20 #error "Only <libedataserver/libedataserver.h> should be included directly."
21 #endif
23 #ifndef E_XML_UTILS_H
24 #define E_XML_UTILS_H
26 #include <glib.h>
27 #include <libxml/parser.h>
28 #include <libxml/xpath.h>
30 G_BEGIN_DECLS
32 void e_xml_initialize_in_main (void);
34 xmlDoc * e_xml_parse_file (const gchar *filename);
35 gint e_xml_save_file (const gchar *filename,
36 xmlDoc *doc);
37 xmlNode * e_xml_get_child_by_name (const xmlNode *parent,
38 const xmlChar *child_name);
40 xmlDoc * e_xml_parse_data (gconstpointer data,
41 gsize length);
42 xmlXPathContext *
43 e_xml_new_xpath_context_with_namespaces
44 (xmlDoc *doc,
45 ...) G_GNUC_NULL_TERMINATED;
46 void e_xml_xpath_context_register_namespaces
47 (xmlXPathContext *xpath_ctx,
48 const gchar *prefix,
49 const gchar *href,
50 ...) G_GNUC_NULL_TERMINATED;
51 xmlXPathObject *
52 e_xml_xpath_eval (xmlXPathContext *xpath_ctx,
53 const gchar *format,
54 ...) G_GNUC_PRINTF (2, 3);
55 gchar * e_xml_xpath_eval_as_string (xmlXPathContext *xpath_ctx,
56 const gchar *format,
57 ...) G_GNUC_PRINTF (2, 3);
58 gboolean e_xml_xpath_eval_exists (xmlXPathContext *xpath_ctx,
59 const gchar *format,
60 ...) G_GNUC_PRINTF (2, 3);
62 G_END_DECLS
64 #endif /* E_XML_UTILS_H */