1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
/* Copyright (C) 2001-2004 Novell, Inc. */
4
#ifndef __E2K_XML_UTILS_H__
5
#define __E2K_XML_UTILS_H__
10
#include <libxml/parser.h>
12
#define E2K_XML_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
14
xmlDoc *e2k_parse_xml (const gchar *buf, gint len);
15
xmlDoc *e2k_parse_html (const gchar *buf, gint len);
17
#define E2K_IS_NODE(node, nspace, nname) \
18
(!xmlStrcmp ((node)->name, (xmlChar *) (nname)) && \
19
(node)->ns && !xmlStrcmp ((node)->ns->href, (xmlChar *) (nspace)))
21
void e2k_g_string_append_xml_escaped (GString *string, const gchar *value);
23
xmlNode *e2k_xml_find (xmlNode *node, const gchar *name);
24
xmlNode *e2k_xml_find_in (xmlNode *node, xmlNode *top, const gchar *name);