nsxml

NSXMLParser problem with “&”(Ampersand) character

给你一囗甜甜゛ 提交于 2019-12-01 13:37:00
My NSXMLParsing is not working because of "&" character.. my code s below .any help please ? NSString *myRequestString = [NSString stringWithFormat:@"http://abc.com/def/webservices/aa.php?family_id=%d",self.passFamilyId]; //NSLog(@"Requested Service = %@",myRequestString); NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:myRequestString]]; [request setHTTPMethod: @"POST" ]; NSData *downloadedData = [ NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *str = [[NSString alloc] initWithData:downloadedData encoding

NSXMLParser problem with “&”(Ampersand) character

对着背影说爱祢 提交于 2019-12-01 10:49:13
问题 My NSXMLParsing is not working because of "&" character.. my code s below .any help please ? NSString *myRequestString = [NSString stringWithFormat:@"http://abc.com/def/webservices/aa.php?family_id=%d",self.passFamilyId]; //NSLog(@"Requested Service = %@",myRequestString); NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:myRequestString]]; [request setHTTPMethod: @"POST" ]; NSData *downloadedData = [ NSURLConnection sendSynchronousRequest:request

NSXMLParser can't parse special characters (accents)

走远了吗. 提交于 2019-11-30 08:59:40
I'm using NSXMLParser to parse an xml from a url (my code is almost exactly the same as here ) Some of the elements contain special characters like "á" which causes a word lik ándre to split into two (á and ndre). Here is my loadXMLByURL -(id) loadXMLByURL:(NSString *)urlString{ tickets = [[NSMutableArray alloc] init]; NSURL *url = [NSURL URLWithString:urlString]; NSData *data = [[NSData alloc] initWithContentsOfURL:url]; parser = [[NSXMLParser alloc] initWithData:data]; parser.delegate = self; [parser parse]; return self;} I'm pretty sure it's because the encoding is not set (I think it needs

NSXMLParser can't parse special characters (accents)

你说的曾经没有我的故事 提交于 2019-11-29 14:05:18
问题 I'm using NSXMLParser to parse an xml from a url (my code is almost exactly the same as here) Some of the elements contain special characters like "á" which causes a word lik ándre to split into two (á and ndre). Here is my loadXMLByURL -(id) loadXMLByURL:(NSString *)urlString{ tickets = [[NSMutableArray alloc] init]; NSURL *url = [NSURL URLWithString:urlString]; NSData *data = [[NSData alloc] initWithContentsOfURL:url]; parser = [[NSXMLParser alloc] initWithData:data]; parser.delegate = self

NSXMLParser Leaking

假如想象 提交于 2019-11-27 01:30:30
I have the following code that leaks. Instruments says that it is the rssParser object that is leaking. I "refresh" the XML feed and it runs the block and it leaks.... file.h @interface TestAppDelegate : NSObject <UIApplicationDelegate> { NSXMLParser *rssParser; } file.m NSData *data = [ NSURLConnection sendSynchronousRequest:request returningResponse: nil error: nil ]; rssParser = [[NSXMLParser alloc] initWithData:data]; [rssParser setDelegate:self]; [rssParser setShouldProcessNamespaces:NO]; [rssParser setShouldReportNamespacePrefixes:NO]; [rssParser setShouldResolveExternalEntities:NO];

NSXMLParser Leaking

只愿长相守 提交于 2019-11-26 09:40:20
问题 I have the following code that leaks. Instruments says that it is the rssParser object that is leaking. I \"refresh\" the XML feed and it runs the block and it leaks.... file.h @interface TestAppDelegate : NSObject <UIApplicationDelegate> { NSXMLParser *rssParser; } file.m NSData *data = [ NSURLConnection sendSynchronousRequest:request returningResponse: nil error: nil ]; rssParser = [[NSXMLParser alloc] initWithData:data]; [rssParser setDelegate:self]; [rssParser setShouldProcessNamespaces