I am not getting that how to differentiate same element name for eg City,Area in two different trees. So help me for this in parsing the same element name in iphone.
<Contacts id="1">
<Fname>Siddharth</Lname>
<Lname>Chopra</Lname>
<Currentaddress>
<Area>Aundh</Area>
<City>Pune</City>
<Phone>8796xxxx</Phone>
</Currentaddress>
<Permanentaddress>
<Area>Bhatar</Area>
<City>Surat</City>
<Phone>989825xxxx</Phone>
</Permanentaddress>
</Contacts>
In your class create an mutable array, that you’ll use as a stack.
if a new element starts, create a object representing it (a custom (managed) object, or a dictionary) and add it to the array. In
didFoundCharacter:alter the object, that is last on the array. IfdidEndElement:is called, save it either to core data, a file, sql or in memory to another array. and remove it from the array.If the elements
<Area>,<City>or<Phone>are handled, you’ll know, that the object on the second last position is the address, they belong to. either<Currentaddress>or<Permanetaddress>.