1 /* $Id: xmlutil.hpp,v 1.8 2006-06-21 09:16:54 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 int get_int(const xmlNode *ptr, int default_value);
19 bool is_element(const xmlNode *ptr,
20 const std::string &ns,
21 const std::string &name);
22 bool is_element_yp2(const xmlNode *ptr, const std::string &name);
23 bool check_element_yp2(const xmlNode *ptr,
24 const std::string &name);
25 std::string get_route(const xmlNode *node);
27 const xmlNode* jump_to(const xmlNode* node, int node_type);
29 const xmlNode* jump_to_next(const xmlNode* node, int node_type);
31 const xmlNode* jump_to_children(const xmlNode* node, int node_type);
33 void check_empty(const xmlNode *node);
36 class XMLError : public std::runtime_error {
38 XMLError(const std::string msg) :
39 std::runtime_error("XMLError : " + msg) {} ;
47 * indent-tabs-mode: nil
48 * c-file-style: "stroustrup"
50 * vim: shiftwidth=4 tabstop=8 expandtab