Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Below is the parser i wrote.. </p> <pre><code>- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { if([elementName isEqualToString:@"RESULTS"]) { //Initialize the array. //appDelegate.maps = [[NSMutableArray alloc] init]; } else if([elementName isEqualToString:@"COLUMN"]) { //Initialize the book. amaps = [[MapDetails alloc] init]; dict = [[NSDictionary alloc] initWithDictionary:attributeDict]; if ([[attributeDict objectForKey:@"NAME"] isEqualToString:@"NAME"]) { } } } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { str123=[NSString stringWithFormat:@"%@",string]; } // this delegate method is called if an error occurs in locating your current location - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { NSLog(@"STEP 3: Failed!!! Finding location : %@ ", error); if ( kCLErrorDenied) { } else { // We handle all non-CoreLocation errors here } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"RESULTS"]) return; if([elementName isEqualToString:@"COLUMN"]) { amaps.NAME = [NSString stringWithString:str123]; NSLog(@"%@",amaps.NAME); if ([[dict objectForKey:@"NAME"] isEqualToString:@"NAME"]) { [arrName addObject:[NSString stringWithFormat:@"%@",amaps.NAME]]; NSLog(@"arr %@",arrName); } if ([[dict objectForKey:@"NAME"] isEqualToString:@"ANAME"]) { [arrArabName addObject:[NSString stringWithFormat:@"%@",amaps.NAME]]; NSLog(@"arr %@",arrArabName); } if ([[dict objectForKey:@"NAME"] isEqualToString:@"YCOORD_WGS"]) { [arrLatitude addObject:[NSString stringWithFormat:@"%@",amaps.NAME]]; NSLog(@"arr %@",arrLatitude); } if ([[dict objectForKey:@"NAME"] isEqualToString:@"XCOORD_WGS"]) { [arrLongitude addObject:[NSString stringWithFormat:@"%@",amaps.NAME]]; NSLog(@"arr %@",arrLongitude); } } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    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