i have an xml data like\[code\] <MenuItem><ItemId>0e29531a-c08f-49a9-a8d0-9cdbeb156145</ItemId><ItemName>Grades</ItemName><MenuItemId>4dc25103-906c-44e7-ae94-a30c37c8c5e6</MenuItemId></MenuItem><MenuItem><ItemId>72a10662-c1e2-42bf-b8d9-0a879b729e54</ItemId><ItemName>Manage Account(s)</ItemName><MenuItemId>b0d16a5d-9468-40a3-879c-006c8583ddba</MenuItemId></MenuItem><MenuItem><ItemId>49155938-346d-44c9-b44d-70c2770b7414</ItemId><ItemName>Linked Guardians</ItemName><ParentId>72a10662-c1e2-42bf-b8d9-0a879b729e54</ParentId></MenuItem>\[/code\]so i want to fetch \[code\]ItemName\[/code\] of only first two tags, but not last tag, because last tag is child of tag 2, but it has \[code\]itemName\[/code\]too, the order of this xml lines may change.how to fetch this in objective C\[code\]- (void)parserNSXMLParser *)parser didEndElementNSString *)elementName namespaceURINSString *)namespaceURI qualifiedNameNSString *)qName{ if([elementName isEqualToString"ItemName"]){ xmlStringFileObject.xmltitle=nodecontent; } }\[/code\]i tried the above, but i am getting all the three