How to hadle a tags inside another tags in NSXMLParser
- by SimpleMan
I have a file:
<xml>
<component>something
<system>somethingDeeper
<value>somethingDeepest</value>
</system>
</component>
<component>somethinfDifferent
<value>somethingDifferentDeeper</value>
</component>
<value>somethingNew</value>
</xml>
So i want to distinguish what is inside another tag (ex. <system>) what is not. How to do this with NSXMLParser ? I currently use BOOL ivar's but this is a lot of tags and this is not as elegant as i want it to be. I know that NSXMLParser is a SAX parser and i understand that.
In above example I will be enter to didEndElement method three times with:
elementName equal value Is there a more elegant way to distinguish what entry was from <component> tag above what not?