00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #define X_SPLIT_ATTRIBUTES
00013 #define X_LIGHTER_STRINGS
00014
00015 #include "country.h"
00016
00017 int main ( int argc, char *argv[] ) {
00018 FILE* input;
00019 country::Country* ex = NULL;
00020 input = fopen("country.xml","r+");
00021
00022 xml_loader* xl = new xml_loader(input, new country::DocumentImpl());
00023 ex = (country::Country*)(xl->getDocument()->root);
00024 delete xl;
00025
00026 fclose(input);
00027
00028 if(!ex) {
00029 printf("result is null\n");
00030 return -1;
00031 }
00032
00033
00034
00035 printf("nms len: %i\n", ex->nms.size());
00036
00037
00038 printf("populations len: %i\n", ex->populations.size());
00039
00040 printf("to_xml test: ");
00041 to_xml(*ex);
00042 printf("\n");
00043
00044 return 0;
00045 }