X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=c%2B%2B0x%2Fattribute2.cpp;fp=c%2B%2B0x%2Fattribute2.cpp;h=94cf17d24f56277c00d70420529101e16a118650;hb=a87410331a3cf42444d92930a9a796a384278c8d;hp=0000000000000000000000000000000000000000;hpb=9479feb34459b0d1fcdaa6a6545827f3243cb513;p=xml-template diff --git a/c++0x/attribute2.cpp b/c++0x/attribute2.cpp new file mode 100644 index 0000000..94cf17d --- /dev/null +++ b/c++0x/attribute2.cpp @@ -0,0 +1,21 @@ +#include + +#include "xml-template.h" + +using namespace std; + +int main(int argc, char **argv) +{ + Substitute master_directive = { + make_pair("color", new Replace("blue")), + make_pair("#things", new Alternate { "li/class", { + new Substitute { make_pair("li", new Replace("Raindrops on roses")), }, + new Substitute { make_pair("li", new Replace("Whiskers on kittens")), }, + new Substitute { make_pair("li", new Replace("Bright copper kettles")), }, + new Substitute { make_pair("li", new Replace("Warm, woolen mittens")), }, + }, { "odd", "even" } }), + }; + + process_file("../xml/clone.xml", argv[1], &master_directive); + return(0); +}