File: e2k-xml-utils.h

package info (click to toggle)
evolution-data-server 1.6.3-5etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 59,384 kB
  • ctags: 43,218
  • sloc: ansic: 319,315; tcl: 30,499; xml: 19,166; sh: 18,776; perl: 11,529; cpp: 8,259; java: 7,653; makefile: 6,448; awk: 1,338; yacc: 1,103; sed: 772; cs: 505; lex: 134; asm: 14
file content (24 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* Copyright (C) 2001-2004 Novell, Inc. */

#ifndef __E2K_XML_UTILS_H__
#define __E2K_XML_UTILS_H__

#include <string.h>

#include "e2k-types.h"
#include <libxml/parser.h>

#define E2K_XML_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"

xmlDoc *e2k_parse_xml  (const char *buf, int len);
xmlDoc *e2k_parse_html (const char *buf, int len);

#define E2K_IS_NODE(node, nspace, nname) (!strcmp (node->name, nname) && node->ns && !strcmp (node->ns->href, nspace))

void  e2k_g_string_append_xml_escaped (GString *string, const char *value);

xmlNode *e2k_xml_find    (xmlNode *node, const char *name);
xmlNode *e2k_xml_find_in (xmlNode *node, xmlNode *top, const char *name);

#endif