I am doing xml parsing while my url authenticates the url with username and password.
When I put this URL in a browser, it asks me for a username and password for login.
I want to parse this url in iphone using NSXMLParser .
For parsing, I use the code below, but for me it returns a parseErrorOccured error.
NSString *UploadCardDesign=kLOGIN_URL; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:UploadCardDesign]] autorelease]; [request setHTTPMethod: @"GET"]; [request setHTTPBody:nil]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
And for parsing:
xmlParser = [[NSXMLParser alloc] initWithData:returnData]; [xmlParser setDelegate:self]; [xmlParser parse];
Please help me for the same or let me know what I'm doing for good results.
source share