I am new in iOS and I am facing the problem regarding to replace the string value in foundCharacters
method of NSXMLPerser.
My code is like this
-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
myMutableStringassignedObj=[[NSMutableString alloc]initWithString:string];
NSLog(@"Array String: %@",myMutableStringassignedObj);
myMutableStringassignedObj = [[myMutableStringassignedObj stringByReplacingOccurrencesOfString:@"&"
withString:@"and"] mutableCopy];//I am changing string like this but it not working
NSData *data = [myMutableStringassignedObj dataUsingEncoding:NSUTF8StringEncoding];
responseassigneddict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSLog(@"JSON DATA = %@",responseassigneddict);
}
Due to the & It's give me null value. Is there is any way to change it. Thanks in Advance!