Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>-(void)startParsingForLogin:(NSString *)userIdStr Password:(NSString *)passwordStr { NSString *urlString = [NSString stringWithFormat:@"http://www.example.com/loginxml.php?username=%@&amp;password=%@",userIdStr,passwordStr]; ////////NSLog(@"urlString : %@",urlString); NSURL *xmlURL = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] initWithURL:xmlURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0]autorelease]; NSURLResponse *returnedResponse = nil; NSError *returnedError = nil; NSData *itemData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;returnedResponse error:&amp;returnedError]; //NSString *itemString = [[[NSString alloc] initWithBytes:[itemData bytes] length:[itemData length] encoding:NSUTF8StringEncoding]autorelease]; //////NSLog(@"itemString : %@",itemString); xmlParser = [[NSXMLParser alloc] initWithData:itemData]; [xmlParser setDelegate:self]; [xmlParser parse]; } - (void)parserDidStartDocument:(NSXMLParser *)parser { ////////NSLog(@"parserDidStartDocument"); } - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { ////////NSLog(@"parseErrorOccurred"); NSString * errorString = [NSString stringWithFormat:@"Error (Error code %i )", [parseError code]]; UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"Error loading data" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [errorAlert show]; [errorAlert release]; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes: (NSDictionary *)attributeDict { ////NSLog(@"didStartElement"); ////NSLog(@"elementName : %@",elementName); ////NSLog(@"namespaceURI : %@",namespaceURI); ////NSLog(@"qualifiedName : %@",qualifiedName); ////NSLog(@"attributeDict : %@",attributeDict); [registerNewArr addObject:attributeDict]; } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { ////NSLog(@"foundCharacters"); } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { /////NSLog(@"didEndElement"); } - (void)parserDidEndDocument:(NSXMLParser *)parser { } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload