#include <algorithm>
#include <stdexcept>
#include <functional>
#include <cstring>
// libxml includes
#include <libxml/tree.h>