I hope that, the Array is getting re-initialed at every time of NSXMLParser
delegates called .
You need to initialise the Array, before the
NSXMLParser delegates
called.
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qualifiedName attributes: (NSDictionary *)attributeDict
{
//Don't initialise your NSArray here
}
}
-(void) parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
NSLog(@"foundCharacters ::::: %@ :::: ", string);
[xmlArray addObject:string];
}