xml parsing consumes time need efficent way on iphone
<p>How to call main thread ??? i can parse but i cant display data </p>

<pre><code>- (void)viewDidLoad {
    //self.navigationItem.rightBarButtonItem = self.editButtonItem;
    self.parentViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"10.png"]];
    [super viewDidLoad];
  [NSThread detachNewThreadSelector:@selector(startTheBackgroundJob) toTarget:self withObject:nil]; 

      }


- (void)startTheBackgroundJob {  


    NSUserDefaults *getida = [NSUserDefaults standardUserDefaults];

        myIDa = [getida stringForKey:@"AppID"];

        NSLog(@"@BOOK MARK ");



        NSString *ubook = [[NSString alloc] initWithFormat:@"http://www.wapp=%@&amp;action=show",myIDa];
        NSLog(@" bookmark %@",ubook);
        [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
        //NSString *outputString = [[NSString stringWithString:usearch] stringByAppendingString: UserText];
        ubook = [ubook stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];


        NSLog(@"My string is  now =  %@", ubook);

        NSURL *url = [[[NSURL alloc] initWithString:ubook]autorelease];
        //NSURL *url=   [NSURL URLWithString:outputString];

            NSLog(@" bookmark URL IS  %@",url);

        NSXMLParser *xmlParser = [[[NSXMLParser alloc] initWithContentsOfURL:url] autorelease];

        //Initialize the delegate.
        XMLParserbookm *parser = [[[XMLParserbookm alloc] initXMLParser]autorelease];

        //Set delegate
        [xmlParser setDelegate:parser];

        //Start parsing the XML file.
        BOOL success = [xmlParser parse];
        if(success)
        {

            NSLog(@" xml parsed suucess");

            //[super viewDidLoad];

            [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;


            //[self searchTableView];   
            //mytimer4=[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(wipe) userInfo:nil repeats:NO];
        }

        else{
            NSLog(@"eeror");
        }
        [NSThread sleepForTimeInterval:3];  
    [self performSelectorOnMainThread:@selector(makeMyProgressBarMoving) withObject:nil  waitUntilDone:NO];   // HOW TO CALL MAIN THREAD
    [pool release]

}
</code></pre>
