#include "config.h"
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <vector>
#include "util.h"
#include "sqlapi.h"
#include "xml_util.h"
#include "db_table.h"
#include "ap_schema.h"

receiver_config input;

int main() {
   xml_ostream xml_cout(std::cout,"receiver_array");
   if (!sql_database("sah2@master_tcp")) exit(1);
   xml_cout << xml_indent() << "<row_count>" <<  input.count() << "</row_count>\n" ;
   if (input.open_query()) {
     while (input.get_next()) {
       xml_cout << input.print_xml();
     }
   }
}
