How to display the xml parsing data in the UItextfield in iphone
===

Hi i am able to parse the xml data and able to display it in the console, but i am not able to display that data in the UITextField or in UILabel,I tried to assign to textfield in the viewdidload method also.

The following is my code,


    NSMutableString *currentNodeContent;
    NSXMLParser *parser;
    ViewController *currentProfile;
    bool isStatus;
    
    ViewController *xmlParser;
    
    -(id)loadXMLByURL:(NSString *)urlString
    {
        _profile = [[NSMutableArray alloc] init];
        NSURL *url = [NSURL URLWithString:urlString];
        NSData *data = [[NSData alloc] initWithContentsOfURL:url];
        parser = [[NSXMLParser alloc] initWithData:data];
        parser.delegate = self;
        [parser parse];
        return self;
    }
    
    -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
    {
        currentNodeContent = (NSMutableString *) [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
    }
    
    -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
    {
        if([elementName isEqualToString:@"profileinfo"])
        {
            currentProfile = [ViewController alloc];
            isStatus = YES;
        }
        
        if([elementName isEqualToString:@"first_name"])
        {
            currentProfile = [ViewController alloc];
            isStatus = YES;
        }
    }
    
    -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
    {
        if([elementName isEqualToString:@"first_name"])
        {
            currentProfile.firstName = currentNodeContent;
            NSLog(@"%@",currentProfile.firstName);
            first_Name.text = currentNodeContent;//UITextField
            first_name.text = currentNodeContent;//Label
          
        }
        if([elementName isEqualToString:@"last_name"])
        {
            currentProfile.lastName = currentNodeContent;
             NSLog(@"%@",currentProfile.lastName);
            last_Name.text = currentProfile.lastName;
        }
        if([elementName isEqualToString:@"profileinfo"])
        {
            [self.profile addObject:currentProfile];
            currentProfile = nil;
            currentNodeContent = nil;
        }
    }
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
    	xmlParser = [[ViewController alloc] loadXMLByURL:@"http://www.mxxxxx.net/xxx/xxxxx.aspx?type=proifileinfo&loginid=xxx@gmail.com"];
        
    }

Thanks in Advance...