1 /* $Id: xmlutil.hpp,v 1.7 2006-06-19 13:08:00 adam Exp $
2 Copyright (c) 2005-2006, Index Data.
4 See the LICENSE file for details
12 #include <libxml/tree.h>
14 namespace metaproxy_1 {
16 std::string get_text(const xmlNode *ptr);
17 bool get_bool(const xmlNode *ptr, bool default_value);
18 bool is_element(const xmlNode *ptr,
19 const std::string &ns,
20 const std::string &name);
21 bool is_element_yp2(const xmlNode *ptr, const std::string &name);
22 bool check_element_yp2(const xmlNode *ptr,
23 const std::string &name);
24 std::string get_route(const xmlNode *node);
26 const xmlNode* jump_to(const xmlNode* node, int node_type);
28 const xmlNode* jump_to_next(const xmlNode* node, int node_type);
30 const xmlNode* jump_to_children(const xmlNode* node, int node_type);
32 void check_empty(const xmlNode *node);
35 class XMLError : public std::runtime_error {
37 XMLError(const std::string msg) :
38 std::runtime_error("XMLError : " + msg) {} ;
46 * indent-tabs-mode: nil
47 * c-file-style: "stroustrup"
49 * vim: shiftwidth=4 tabstop=8 expandtab