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>
2
  • Try parsing first or show what you have done for that. Commented May 4, 2013 at 8:52
  • @Sa Kan Were you able to solve your issue? Commented Jun 6, 2013 at 6:06

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 for: "Please try to at least google or see previous answers before asking a question"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.