I am trying to parse an XML file as below
<Subject>
<chapter>
<Question>abc</Question>
<answer>avksn</answer>
</chapter>
<chapter>
<Question>def</Question>
<answer>avksn</answer>
</chapter>
<chapter>
<Question>ccsv</Question>
<answer>avksn</answer>
</chapter>
</Subject>
in this i am able to count the number of chapter. the number of chapter is equal to number of question and answer. i have also placed a button named as ok in my layout.
now i want to display the first question and after clicking ok i want to display the second question and it goes till the end. When i reached the last question i want to move to a new activity.
how to perform this, pls help me