how to parse xml
<p>i am having an output xml which looks something like this,</p>

<pre><code>    &lt;?xml version="1.0"?&gt;
&lt;root&gt;   
 &lt;apple&gt;&lt;apple1&gt;A&lt;/apple1&gt;&lt;/apple&gt;
    &lt;ball&gt;&lt;ball1&gt;B&lt;/ball1&gt;&lt;/ball&gt;
    &lt;cat&gt;&lt;cat1&gt;C&lt;/cat1&gt;&lt;/cat&gt;
    &lt;dog&gt;&lt;dog1&gt;D&lt;/dog1&gt;&lt;/dog&gt;
    &lt;ele&gt;&lt;ele1&gt;E&lt;/ele1&gt;&lt;/ele&gt;
&lt;root&gt;
</code></pre>

<p>i am using NSXmlParser, i m confused, is tgis a gud xml structure?>//
secondly i dont knw how to parse this xml , i mean how should i write condition in parser <code>didSTart</code> and <code>didEndElement</code> ???</p>

<p>i m not to able properly navigate through each node, from apple to ele. i just want to assign the returned value of say apple to a string.
same for each node.</p>

<p>i m so confused in if / else condition.</p>

<p>Suggestions are always appreciated</p>

<p>regards</p>
