i’m getting a UTF8 encoded data from a server data is like Less%20than%20100 but i need this data in Less than 100 (decoded format),my NSXMLParsing delegate method is like
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict {
if([elementName isEqualToString:@"option"]) {
dict = [[NSMutableDictionary alloc]init];
[dict setValue:[attributeDict objectForKey:@"text"] forKey:@"text"];/* Here itself i need to decode & save in to my dict */
}
How to decode this data.
After you have decoded your xml, use
stringByReplacingPercentEscapesUsingEncoding:method onNSString:See the docs here.