src/country.cpp

См. документацию.
00001 //
00002 // C++ Implementation: country
00003 //
00004 // Description: 
00005 //
00006 //
00007 // Author: yessss <gennadiyesss@mail.ru>, (C) 2007
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
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      //printf("nm0: <%s>\n", ex->nms[0]->value);
00034 
00035      printf("nms len: %i\n", ex->nms.size());
00036 
00037      //printf("populations0: <%s>\n", ex->populations[0]->value);
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 }

Документация по XDataServer. Последние изменения: Thu Jul 12 11:49:42 2007. Создано системой  doxygen 1.5.2