How to receive xml data from server in Android

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roshan ban
    New Member
    • Apr 2012
    • 21

    #1

    How to receive xml data from server in Android

    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
    Code:
    Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
                Response.Write("<ContactList>");
                for (int i = 0; i < dsReport.Tables[0].Rows.Count; i++)
                {
                    Response.Write("<Contact>");
                    Response.Write("<No>"+dsReport.Tables[0].Rows[i][0].ToString()+"</No>");
                    Response.Write("<ContactName>" + dsReport.Tables[0].Rows[i][1].ToString() + "</ContactName>");
                    Response.Write("<Address>" + dsReport.Tables[0].Rows[i][2].ToString() + "</Address>");
                    Response.Write("<Phone>" + dsReport.Tables[0].Rows[i][3].ToString() + "</Phone>");
                    Response.Write("</Contact>");
                }
                Response.Write("</ContactList>");
                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.
    Last edited by Rabbit; Dec 24 '12, 06:43 AM. Reason: Please use code tags when posting code.
Working...