3 #include "xml-template.h"
7 int main(int argc, char **argv)
9 vector<Directive *> things;
12 unordered_map<string, Directive *> submap;
13 submap.insert(make_pair("li", new Replace("Raindrops on roses")));
14 things.push_back(new Substitute(submap));
17 unordered_map<string, Directive *> submap;
18 submap.insert(make_pair("li", new Replace("Whiskers on kittens")));
19 things.push_back(new Substitute(submap));
22 unordered_map<string, Directive *> submap;
23 submap.insert(make_pair("li", new Replace("Bright copper kettles")));
24 things.push_back(new Substitute(submap));
27 unordered_map<string, Directive *> submap;
28 submap.insert(make_pair("li", new Replace("Warm, woolen mittens")));
29 things.push_back(new Substitute(submap));
32 unordered_map<string, Directive *> master_map;
33 master_map.insert(make_pair("color", new Replace("blue")));
34 master_map.insert(make_pair("#things", new Clone(things)));
36 process_file("../xml/clone.xml", argv[1], new Substitute(master_map));