]> git.sesse.net Git - xml-template/blob - c++11/include.cpp
Fix some errors in the include test for php5-swig.
[xml-template] / c++11 / include.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 doc_directive = {
10                 make_pair("color", new Replace("red")),
11         };
12         xmlDocPtr doc = process_file("../xml/included.xml", &doc_directive, false);
13
14         Substitute master_directive = {
15                 make_pair("title", new Replace("Main HTML title")),
16                 make_pair("h1", new Replace("Nice heading here")),
17                 make_pair("contents", new ReplaceInclude(doc)),
18         };
19
20         xmlDocPtr master = process_file("../xml/master.xml", &master_directive);
21         output_to_fd_and_free(master, 1);
22         return(0);
23 }