
#ifndef XML_MISC_TOOLS_H
#define XML_MISC_TOOLS_H

#include<list>
#include<string>
#include<iostream>
#include <libxml++/libxml++.h>       //Works provided you compile with -I path/to/libxml_home_directory

using namespace std;

// ADDITIONAL libxml++ routines

list<xmlpp::Element*> get_Element_children(const xmlpp::Node* father_node, std::string imposedName="");
std::string get_text_content(const xmlpp::Node* father_node);


// Create a list of strings from a series of string arguments
// to be continued if ever found necessary :-( (for an object with more than 6 levels of pointers and/or containers)
list<string> xml_names(string str1);
list<string> xml_names(string str1, string str2);
list<string> xml_names(string str1, string str2, string str3);
list<string> xml_names(string str1, string str2, string str3, string str4);
list<string> xml_names(string str1, string str2, string str3, string str4, string str5);
list<string> xml_names(string str1, string str2, string str3, string str4, string str5, string str6);


// Debugging tools

#define ENTERING_NODE(function,node) \
cerr<<"Entering function "<<#function<<" at node "<<node->get_name()<<endl;

#define ENTERING(function) \
cerr<<"Entering function "<<#function<<endl;

#define EXITING(function) \
cerr<<"Exiting function "<<#function<<endl;

void xml_print_list(list<xmlpp::Element*> & liszt);


# endif

