]> git.sesse.net Git - xml-template/blobdiff - c++0x/attribute.cpp
Tweak C++0x API a bit, to prepare for include. Also, output to stdout instead of...
[xml-template] / c++0x / attribute.cpp
index 70b2391347836f2a64a0605d3a3811e2b3871eec..e6513230be4b083d8910af28edd7da87dad85429 100644 (file)
@@ -7,7 +7,7 @@ using namespace std;
 int main(int argc, char **argv)
 {
        Substitute master_directive = {
-               make_pair("color", new Replace("blue")),
+               make_pair("color", new Replace("red")),
                make_pair("#things", new Clone {
                        new Substitute {
                                make_pair("li", new Replace("Raindrops on roses")),
@@ -28,6 +28,7 @@ int main(int argc, char **argv)
                }),
        };
 
-       process_file("../xml/clone.xml", argv[1], &master_directive);
+       xmlDocPtr doc = process_file("../xml/clone.xml", &master_directive);
+       output_to_fd_and_free(doc, 1);
        return(0);
 }