hello i am new in android
i want know how to iterate child node from xml
xml is as follow
<?xml version="1.0" encoding="utf-8"?> <ACT>
<Item>ABC</Item>
<Item>XYZ</Item> </ACT>
i want to take Item VAlue From ACT tag
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at this answer.
Update: the code posted will only list the first Item because the loop over
nodes3inonCreateloops only over theACTelements. Since you have only one of these, the loop will iterate once, write out the first child and then terminate. You must have a second loop inside your loop where you iterate over all child nodes of elemente.