1 #ifndef _XML_TEMPLATE_H
2 #define _XML_TEMPLATE_H 1
4 #include <libxml/tree.h>
8 #include <unordered_map>
12 virtual void process(xmlNode *node, bool clean) = 0;
15 class Replace : public Directive {
17 Replace(const std::string &str);
18 virtual void process(xmlNode *node, bool clean);
21 const std::string str;
24 class Substitute : public Directive {
26 Substitute(const std::unordered_map<std::string, Directive*> &substitution_map);
28 virtual void process(xmlNode *node, bool clean);
31 const std::unordered_map<std::string, Directive*> &substitution_map;
34 void process_file(const std::string &input_filename,
35 const std::string &output_filename,
36 Directive *root_directive);
38 #endif // !defined(_XML_TEMPLATE_H)