3 #include <libxml/parser.h>
5 #include "xml-template.h"
9 int main(int argc, char **argv)
13 unordered_map<string, Directive*> master_map;
14 master_map.insert(make_pair("title", new Replace("A very basic example")));
15 master_map.insert(make_pair("#hello", new Replace("Hello world!")));
17 xmlDocPtr doc = xmlParseFile("../xml/simple.xml");
18 Substitute(master_map).process(xmlDocGetRootElement(doc), false);
19 xmlSaveFile(argv[1], doc);