X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=c%2B%2B0x%2Fpassthru.cpp;h=28cc2f4873311705e0e2a7192eb20514bb5736a2;hb=ad45bc892752571fec46b21564e4683c074f1d46;hp=2db2e3d9adafc10288dd5d9997cd882e311a8f64;hpb=01379ffa98201067728e63135eb1d6d66266650e;p=xml-template diff --git a/c++0x/passthru.cpp b/c++0x/passthru.cpp index 2db2e3d..28cc2f4 100644 --- a/c++0x/passthru.cpp +++ b/c++0x/passthru.cpp @@ -8,15 +8,8 @@ using namespace std; int main(int argc, char **argv) { - LIBXML_TEST_VERSION - - unordered_map master_map; - - xmlDocPtr doc = xmlParseFile("../xml/passthru.xml"); - Substitute(master_map).process(xmlDocGetRootElement(doc), false); - xmlSaveFile(argv[1], doc); - - xmlCleanupParser(); - xmlMemoryDump(); + Substitute master_directive = {}; + xmlDocPtr doc = process_file("../xml/passthru.xml", &master_directive); + output_to_fd_and_free(doc, 1); return(0); }