By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,644 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,644 IT Pros & Developers. It's quick & easy.

How to receive xml data from server in Android

P: 21
Hello every one! I've a problem regarding obtaining the data in java i.e android software. The problem is that using an aspx page i've written a xml data structure in the page as below:
Aspx Code for generating xml data
Expand|Select|Wrap|Line Numbers
  1. Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
  2.             Response.Write("<ContactList>");
  3.             for (int i = 0; i < dsReport.Tables[0].Rows.Count; i++)
  4.             {
  5.                 Response.Write("<Contact>");
  6.                 Response.Write("<No>"+dsReport.Tables[0].Rows[i][0].ToString()+"</No>");
  7.                 Response.Write("<ContactName>" + dsReport.Tables[0].Rows[i][1].ToString() + "</ContactName>");
  8.                 Response.Write("<Address>" + dsReport.Tables[0].Rows[i][2].ToString() + "</Address>");
  9.                 Response.Write("<Phone>" + dsReport.Tables[0].Rows[i][3].ToString() + "</Phone>");
  10.                 Response.Write("</Contact>");
  11.             }
  12.             Response.Write("</ContactList>");
  13.             Response.End();
And now the problem begins and the problem is how to get this data in the android application so that I could easily parse the data for the report.
Waiting for the response.
Dec 24 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.