tags:

views:

22

answers:

0

i am using nxmlparser now inorder to download all the images i am using this

if([elementName isEqualToString:@"image"]) {

  //if([elementName isEqualToString:@"image"])
  //[aBook release];
  //aBook = nil;
  NSLog(@"Processing images Value: %@", currentElementValue);

  NSUserDefaults *img = [NSUserDefaults standardUserDefaults];
  [img setObject:currentElementValue forKey:@"keyToimg"];// 10 images 
  return;

 }

and to retrive all the images i am doing like this but its slow sometime so is there any way in Nsxmlparser to get all the images efficiently ??

NSUserDefaults *imgg = [NSUserDefaults standardUserDefaults];
 myimg= [imgg stringForKey:@"keyToimg"];
 NSLog(@"RES image sssssssss  is = %@",myimg);


 a1 = [[NSMutableArray alloc] init];
 [a1 addObjectsFromArray:[myimg componentsSeparatedByString:@"\n\t"]];