如何通过服务器上的XML文件更新数据

问题描述:

我解析XML文件中的数据并将其存储在数据库中。现在我想通过XML文件更新数据,我有更新数据的URL,但我没有得到的方式发送该网址上的数据..如何通过服务器上的XML文件更新数据

请帮助。

   List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4); 
    nameValuePairs.add(new BasicNameValuePair("latitude", "00.11")); 
    nameValuePairs.add(new BasicNameValuePair("longitude", "00.11")); 
    String url = "http://10.15.66.101:8080/LocationServer/GetLocation"; 

      HttpClient httpClient = new DefaultHttpClient(); 

    HttpPost httpPost = new HttpPost(
      url); 

    httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 

    // Execute HTTP Post Request 
    HttpResponse response = httpClient.execute(httpPost); 

    BusinessManager.getHandler().getLoggerUtilityObj().printMsg(
      "Posting data to server"); 
    // This is done to shutdown the previously open http connection 
    httpClient.getConnectionManager().shutdown();