How to Parse Complex XML file Locally in android



How to parse this XML file locally ? Thanks for every help



<root>
<Questions>
<element>
<answer>1</answer>
<category>15</category>
<date_added>2014-05-01 02:10:33</date_added>
<id>7</id>
<mode>easy</mode>
<options>
<element>2007</element>
<element>2005</element>
<element>2006</element>
<element>2008</element>
</options>
<question>When did the first Apple iPhone become available?</question>
</element>
<element>
<answer>3</answer>
<category>13</category>
<date_added>2014-05-01 02:14:30</date_added>
<id>8</id>
<mode>easy</mode>
<options>
<element>carnivores</element>
<element>omnivores</element>
<element>herbivores</element>
<element>insectivores</element>
</options>
<question>Are Gorillas ______?</question>
</element>
</Questions>
</root>


The above XML file is the file I have to parse locally. I put the XML file into assets folder. It looks like a bit complex XML file. I don’t know how to parse this. Please help me for this. Each and every help are deeply appreciated. Thanks.


No comments:

Post a Comment