#include "xml-template.h"
#include <string.h>
+#include <libxml/parser.h>
using namespace std;
}
}
}
+
+void process_file(const string &input_filename,
+ const string &output_filename,
+ Directive *root_directive)
+{
+ LIBXML_TEST_VERSION
+
+ xmlDocPtr doc = xmlParseFile(input_filename.c_str());
+ root_directive->process(xmlDocGetRootElement(doc), false);
+ xmlSaveFile(output_filename.c_str(), doc);
+
+ xmlCleanupParser();
+ xmlMemoryDump();
+}