android send data as xml to server php
<p>i have data is type String, and i want send this data to server as a xml.How do i do?Can you help me!</p>

<pre><code>httpclient = new DefaultHttpClient();
            httppost = new HttpPost("http://longvansolution.tk/login.php"); // make
                                                                            // sure
                                                                            // the
                                                                            // url
                                                                            // is
                                                                            // correct.
            // add your data
            nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
            // Always use the same variable name for posting i.e the android
            // side variable name and php side variable name should be
            // similar,
            nameValuePairs.add(new BasicNameValuePair("username",
                    txtusername.getText().toString().trim())); // $Edittext_value
                                                                // =
                                                                // $_POST['Edittext_value'];
            nameValuePairs.add(new BasicNameValuePair("password",
                    txtpassword.getText().toString().trim()));
            httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
            // Execute HTTP Post Request
            response = httpclient.execute(httppost);
</code></pre>

<p>Now i don't want use this way, i want send xml.</p>
