// -------------------------------------------------------------------- /* xindice_delete.cpp Feb/28/2012 */ // -------------------------------------------------------------------- #include #include #include #include #include #include #include #include using namespace std; using namespace boost; typedef map Unit; extern string url_get_proc (char url[]); extern void curl_put_proc (char *url_target,string str_in); extern void dict_display_proc (map dict_aa); extern map xml_to_dict_proc (string str_xml); extern string dict_to_xml_proc (map dict_aa); // -------------------------------------------------------------------- int main (int argc,char *argv[]) { cerr << "*** 開始 ***\n"; char key_in[10]; strcpy (key_in,argv[1]); cout << key_in << endl; char url_target[] = "http://host_dbase:8888/xindice/db/cities/cities"; string str_xml = url_get_proc (url_target); map dict_aa = xml_to_dict_proc (str_xml); string key = lexical_cast(key_in); dict_aa.erase (key); dict_display_proc (dict_aa); str_xml = dict_to_xml_proc (dict_aa); cerr << "*** ccc ***\n"; curl_put_proc (url_target,str_xml); cerr << "*** 終了 ***\n"; return 0; } // --------------------------------------------------------------------