0

I am programming in android and I am getting some xml data through SOAP which I am placing in a string object. Now I want to get all the id's from and put them in an array. How do I do that ?????? From the code below, i want to get the values 1101, 1103 in an array..... please help

<getAvailableSpotResult>
         <garage id=1 name='South Garage' address='100 acme dr' city='san jose' state='ca' zip='95052'>
            <floor number='1'>
               <spot id='1101' status='available'/>
               <spot id='1103' status='available'/>
            </floor>
         </garage>
      </getAvailableSpotResult>
Sa Kan
  • 11
  • 3

1 Answers1

1

You need to parse the xml to get the required data. If you google, "How to parse xml in java android", you'll get lots of results. First try and read the official documentation on Parsing XML Data and see the examples.

You can check out other similar questions How to read XML file in android and Read XML file in android. You can also try this tutorial.

Please try to atleast google or see previous answers before asking a question. If there is any specific problem you are facing, everyone would be happy to help.

Community
  • 1
  • 1
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124