-1

I have list of records in xml format from my local host "http:localhost:810/Service1.svc/leb/GetAllCustomers"

Can I call this to android and list it in Textview or Spinner or in EditTextView or in any of the controls in android?

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
Dani
  • 1
  • 1

3 Answers3

1

You should parse this xml file using SAX parse or Dom Parse in android and collect date in arrays/list/map according to your requirement here i am post some link to you get more information form there and get your ASAP.

http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser

http://www.androidpeople.com/android-xml-parsing-tutorial-%E2%80%93-using-domparser

I hope this is very helpful to you.

DynamicMind
  • 4,240
  • 1
  • 26
  • 43
  • thank u very much but i have xml format output but actually not an xml extension file. – Dani May 20 '11 at 10:37
1

Yes you can do that.

Use Intent which takes URL as an argument.

In the URL you can mention the location/URI of your source.

Then, you can parse it to a string and store it.

Later, use ArrayAdapter to populate.

I can get you code if this is what you are trying to do.

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
ngesh
  • 13,398
  • 4
  • 44
  • 60
1

Some links here for you.

1) Multithreading for Performance

to help you understand, how to download a file (example shows downloading an image) via AsyncTask.

2) Working with XML in Android

to help you parse your xml. Check these out. Good luck!

Egor
  • 39,695
  • 10
  • 113
  • 130