1 /* $Id: xmlutil.hpp,v 1.11 2007-01-25 14:05:54 adam Exp $
2 Copyright (c) 2005-2007, Index Data.
4 See the LICENSE file for details
12 #include <libxml/tree.h>
14 namespace metaproxy_1 {
16 std::string get_text(const struct _xmlAttr *ptr);
17 std::string get_text(const xmlNode *ptr);
18 bool get_bool(const xmlNode *ptr, bool default_value);
19 int get_int(const xmlNode *ptr, int default_value);
20 bool check_attribute(const _xmlAttr *ptr,
21 const std::string &ns,
22 const std::string &name);
23 bool is_attribute(const _xmlAttr *ptr,
24 const std::string &ns,
25 const std::string &name);
26 bool is_element(const xmlNode *ptr,
27 const std::string &ns,
28 const std::string &name);
29 bool is_element_mp(const xmlNode *ptr, const std::string &name);
30 bool check_element_mp(const xmlNode *ptr,
31 const std::string &name);
32 std::string get_route(const xmlNode *node);
34 const xmlNode* jump_to(const xmlNode* node, int node_type);
36 const xmlNode* jump_to_next(const xmlNode* node, int node_type);
38 const xmlNode* jump_to_children(const xmlNode* node, int node_type);
40 void check_empty(const xmlNode *node);
43 class XMLError : public std::runtime_error {
45 XMLError(const std::string msg) :
46 std::runtime_error("XMLError : " + msg) {} ;
54 * indent-tabs-mode: nil
55 * c-file-style: "stroustrup"
57 * vim: shiftwidth=4 tabstop=8 expandtab