]> git.sesse.net Git - xml-template/blob - c++11/clone.cpp
Fix some errors in the include test for php5-swig.
[xml-template] / c++11 / clone.cpp
1 #include <stdio.h>
2
3 #include "xml-template.h"
4
5 using namespace std;
6
7 int main(int argc, char **argv)
8 {
9         Substitute master_directive = {
10                 make_pair("color", new Replace("blue")),
11                 make_pair("#things", new Clone {
12                         new Substitute { make_pair("li", new Replace("Raindrops on roses")) },
13                         new Substitute { make_pair("li", new Replace("Whiskers on kittens")) },
14                         new Substitute { make_pair("li", new Replace("Bright copper kettles")) },
15                         new Substitute { make_pair("li", new Replace("Warm, woolen mittens")) },
16                 }),
17         };
18
19         xmlDocPtr doc = process_file("../xml/clone.xml", &master_directive);
20         output_to_fd_and_free(doc, 1);
21         return(0);
22 }