xml configuration dom parsing finished, still missing connection to filter factory...
[metaproxy-moved-to-github.git] / src / ex_router_flexml.cpp
1 /* $Id: ex_router_flexml.cpp,v 1.2 2005-10-31 11:59:08 marc Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include <iostream>
8 #include <stdexcept>
9
10 #include "config.hpp"
11 #include "filter.hpp"
12 #include "router_flexml.hpp"
13
14 int main(int argc, char **argv)
15 {
16     try 
17    {
18        
19        std::string xmlconf = "<?xml version=\"1.0\"?>\n"
20            "<yp2 xmlns=\"http://indexdata.dk/yp2/config/1\">\n"
21            "<start route=\"start\"/>\n"
22            "<filters>\n"
23            "<filter id=\"front_default\" type=\"frontend-net\">\n"
24             "<port>210</port>\n"
25            "</filter>\n"
26            "<filter id=\"log_cout\" type=\"log\">\n"
27            "<logfile>mylog.log</logfile>\n"
28            "</filter>\n"
29            "</filters>\n"
30             "<routes>\n"  
31            "<route id=\"start\">\n"
32            "<filter refid=\"front_default\"/>\n"
33            "<filter refid=\"log_cout\"/>\n"
34            "</route>\n"
35             "</routes>\n"
36            "</yp2>\n";
37        
38        yp2::RouterFleXML rflexml(xmlconf);
39        
40        
41        
42    }
43     catch ( ... ) {
44         std::cerr << "Unknown Exception" << std::endl;
45         throw;
46         std::exit(1);
47     }
48     std::exit(0);
49 }
50
51
52
53
54 /*
55  * Local variables:
56  * c-basic-offset: 4
57  * indent-tabs-mode: nil
58  * c-file-style: "stroustrup"
59  * End:
60  * vim: shiftwidth=4 tabstop=8 expandtab
61  */