title: How to parse this specific XML from HttpResponse in Android?
body: <p>I'm new in Android development. I made an Android app for login in a website. The login page takes three inputs 'username', 'password' &amp; 'pin'.
  I've successfully passed these data using HttpPost method. See the code,</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  
  HttpPost httppost = new HttpPost("http://www.mysite.com/api/service.php");
  
  try {
      // Add user name, password &amp; pin
      String action = "login";
  
      EditText uname = (EditText)findViewById(R.id.txt_username);
      String username = uname.getText().toString();
  
      EditText pword = (EditText)findViewById(R.id.txt_password);
      String password = pword.getText().toString();
  
      EditText pcode = (EditText) findViewById (R.id.txt_pin);
      String pin = pcode.getText().toString();
  
      List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(4);
      nameValuePairs.add(new BasicNameValuePair("action", action));
      nameValuePairs.add(new BasicNameValuePair("username", username));
      nameValuePairs.add(new BasicNameValuePair("password", password));
      nameValuePairs.add(new BasicNameValuePair("pin", pin));
      httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
      // Execute HTTP Post Request
      Log.w("PS", "Execute HTTP Post Request");
      HttpResponse response = httpclient.execute(httppost);
  
      } catch (ClientProtocolException e) {
      e.printStackTrace();
      } catch (IOException e) {
      e.printStackTrace();
     }
  </code></pre>
  
  <p>Now i want to parse the <code>'ack'</code> &amp; <code>'msg'</code> from HttpResponse which is a XML output appears after passing data to the website. See here,</p>
  
  <pre><code>&lt;login&gt;
  &lt;member&gt;
  &lt;id/&gt;
  &lt;username/&gt;
  &lt;name/&gt;
  &lt;ewallpoints/&gt;
  &lt;ack&gt;FAILED&lt;/ack&gt;
  &lt;msg&gt;Wrong Username and Password&lt;/msg&gt;
  &lt;/member&gt;
  &lt;/login&gt;
  </code></pre>