Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid XML Pull Parser child nodes problem
    primarykey
    data
    text
    <p>My application includes two activities :</p> <p>1st activity will contain set of buttons created dynamically from the xml file, when we click on these buttons 2nd activity starts. In 2nd activity i have expandable list view to be populated according to the button clicked in 1st activity.</p> <p>My xml file is like this :</p> <pre><code> &lt;classes&gt; &lt;class name="3"&gt; &lt;syllabus name="ICSE " code="ic" id="" &gt; &lt;subject name="maths"&gt;3 ICSE Maths data&lt;/subject&gt; &lt;subject name="physics"&gt;3 ICSE Physics data&lt;/subject&gt; &lt;subject name="chemistry"&gt;3 ICSE Chemistry data&lt;/subject&gt; &lt;/syllabus&gt; &lt;syllabus name="cbse" code="cb" id="" &gt; &lt;subject name="maths"&gt;3 CBSE Maths data&lt;/subject&gt; &lt;subject name="physics"&gt;3 CBSE Physics data&lt;/subject&gt; &lt;subject name="chemistry"&gt;3 CBSE Chemistry data&lt;/subject&gt; &lt;/syllabus&gt; &lt;/class&gt; &lt;class name="4"&gt; &lt;syllabus name="ICSE " code="ic" id="" &gt; &lt;subject name="maths"&gt;4 ICSE Maths data&lt;/subject&gt; &lt;subject name="physics"&gt;4 ICSE Physics data&lt;/subject&gt; &lt;subject name="chemistry"&gt;4 ICSE Chemistry data&lt;/subject&gt; &lt;/syllabus&gt; &lt;syllabus name="cbse" code="cb" id="" &gt; &lt;subject name="maths"&gt;4 CBSE Maths data&lt;/subject&gt; &lt;subject name="physics"&gt;4 CBSE Physics data&lt;/subject&gt; &lt;subject name="chemistry"&gt;4 CBSE Chemistry data&lt;/subject&gt; &lt;/syllabus&gt; &lt;syllabus name="ssc" code="ss" id="" &gt; &lt;subject name="maths"&gt;4 CBSE Maths data&lt;/subject&gt; &lt;subject name="physics"&gt;4 CBSE Physics data&lt;/subject&gt; &lt;subject name="chemistry"&gt;4 CBSE Chemistry data&lt;/subject&gt; &lt;/syllabus&gt; &lt;/class&gt; &lt;/classes&gt; </code></pre> <p>In above xml file class attribute name is my button of 1st activity. like</p> <p>class 3</p> <p>class 4</p> <p>class 5</p> <p>class 6</p> <p>when the user clicks on particular button he will be taken to another activity with expandable list view, it looks like this:</p> <p>-->CBSE</p> <pre><code> Maths Physics Science </code></pre> <p>-->ICSE</p> <pre><code> Maths Physics Science </code></pre> <p>Now i need to populate this expandable list view dynamically from the xml with the child nodes of particular class tag in xml. For example if user clicks on class3 button expandable list view has to get populated with ICSE and CBSE.</p> <p>And if user clicks on class4 button expandable list view has to get populated with ICSE, CBSE and SSC dynamically from xml.</p> <p>Please help me how to do this with sample code.</p> <p>Thank you in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload