XML parsing in iOS, unable to get the values

NOBODY

New Member
I have been trying to do XML parsing in iOS. But I was not able to parse it unfortunately. Can you help me with this. I was using a SAX parser using NSXML.The data is \[code\]<category><cat id="info" name="id1" value="http://stackoverflow.com/questions/11072265/val1" /><cat id="info" name="id2" value="http://stackoverflow.com/questions/11072265/val2" /></category>\[/code\]How do i get the values using SAX parser? Any help would be appreciated.ThanksAnswer- (To get the attributes)I used it this way (attributedict is the NSDictionary object in didStartElement method)\[code\]NSString *attr = [attributeDict valueForKey:@"name"];if([attr isEqualToString:@"id1"]){NSLog("%@", [attributeDict valueForKey:@"value"]);}\[/code\]
 
Back
Top