X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=include%2Fmetaproxy%2Fxmlutil.hpp;h=6909ab3400b1a105b3b871e04ed88c0d5eece2e9;hb=e3b7970c1a533e4c14aa459f80ab002af4fdabf3;hp=5377bb42241d8a41b341237e6a3038aa8cf08701;hpb=e6d572ef110d14fa55115021505b808620457bd3;p=metaproxy-moved-to-github.git diff --git a/include/metaproxy/xmlutil.hpp b/include/metaproxy/xmlutil.hpp index 5377bb4..6909ab3 100644 --- a/include/metaproxy/xmlutil.hpp +++ b/include/metaproxy/xmlutil.hpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2010 Index Data + Copyright (C) Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -29,28 +29,33 @@ namespace metaproxy_1 { std::string get_text(const xmlNode *ptr); bool get_bool(const xmlNode *ptr, bool default_value); int get_int(const xmlNode *ptr, int default_value); - bool check_attribute(const _xmlAttr *ptr, + + void parse_attr(const xmlNode *node, const char **names, + std::string *values); + bool check_attribute(const _xmlAttr *ptr, const std::string &ns, const std::string &name); - bool is_attribute(const _xmlAttr *ptr, + bool is_attribute(const _xmlAttr *ptr, const std::string &ns, const std::string &name); - bool is_element(const xmlNode *ptr, + bool is_element(const xmlNode *ptr, const std::string &ns, const std::string &name); bool is_element_mp(const xmlNode *ptr, const std::string &name); - bool check_element_mp(const xmlNode *ptr, + bool check_element_mp(const xmlNode *ptr, const std::string &name); std::string get_route(const xmlNode *node); + std::string get_route(const xmlNode *node, std::string &auth); const xmlNode* jump_to(const xmlNode* node, int node_type); const xmlNode* jump_to_next(const xmlNode* node, int node_type); - + const xmlNode* jump_to_children(const xmlNode* node, int node_type); void check_empty(const xmlNode *node); + std::string url_recipe_handle(xmlDoc *doc, std::string recipe); } class XMLError : public std::runtime_error { public: