Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my xml file


XML
<GetAllReportsMethodResponse xmlns="http://tempuri.org/">
<GetAllReportsMethodResult>
<ReportData xmlns="">
<Data Branch="Default Branch" Gross="120.000000" Net="120.000000"/>
<Data Branch="Plano" Gross="1200.000000" Net="1188.000000"/>
<Data Branch="Plano" Gross="30000.000000" Net="29700.000000"/>
<Data Branch="Plano" Gross="4800.000000" Net="4536.000000"/>
<Data Branch="Plano" Gross="3000.000000" Net="3078.000000"/>
<Data Branch="Plano" Gross="1400.000000" Net="1323.000000"/>
<Data Branch="Plano" Gross="4500.000000" Net="4637.250000"/>
<Data Branch="Plano" Gross="4500.000000" Net="4637.250000"/>
<Data Branch="Plano" Gross="4500.000000" Net="4252.500000"/>
<Data Branch="Plano" Gross="4500.000000" Net="4637.250000"/>
<Data Branch="Plano" Gross="7500.000000" Net="7087.500000"/>
<Data Branch="Plano" Gross="675.000000" Net="668.250000"/>
<Data Branch="Plano" Gross="7500.000000" Net="7728.750000"/>
<Data Branch="Plano" Gross="7500.000000" Net="7728.750000"/>
<Data Branch="Plano" Gross="0.000000" Net="0.000000"/>
<Data Branch="Plano" Gross="100000.000000" Net="100000.000000"/>
</ReportData>
</GetAllReportsMethodResult>
</GetAllReportsMethodResponse>


I want to parse it and assign to the controls(edittext,listview) in android.
Posted

1 solution

 
Share this answer
 
Comments
Raghu Golla 9-Dec-14 7:45am    
I am receiving this output as httpresponse,now from that point i want to parse it and populate a listview using those records.
Please help me i am getting some issues,if any example please attach it.

Thanks in advance.
Richard MacCutchan 9-Dec-14 11:48am    
You can automate much of that using a ListView, see http://developer.android.com/guide/topics/ui/layout/listview.html.
Raghu Golla 15-Dec-14 1:09am    
The example posted by you for xml parsing was not the correct one i am looking for,
my xml file is different from what you posted in the above
Richard MacCutchan 15-Dec-14 4:11am    
Then maybe you need to do it a different way. Look at the Android documentation for other options when parsing XML.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900