]> git.sesse.net Git - xml-template/blobdiff - c++0x/passthru.cpp
Move the C++0x file processing logic into a shared function.
[xml-template] / c++0x / passthru.cpp
index 2db2e3d9adafc10288dd5d9997cd882e311a8f64..afc38ec129bc9d8f6a0b3337706efc404fa8847f 100644 (file)
@@ -8,15 +8,7 @@ using namespace std;
 
 int main(int argc, char **argv)
 {
-       LIBXML_TEST_VERSION
-
        unordered_map<string, Directive*> master_map;
-
-       xmlDocPtr doc = xmlParseFile("../xml/passthru.xml");
-       Substitute(master_map).process(xmlDocGetRootElement(doc), false);
-       xmlSaveFile(argv[1], doc);
-
-       xmlCleanupParser();
-       xmlMemoryDump();
+       process_file("../xml/passthru.xml", argv[1], new Substitute(master_map));
        return(0);
 }