Using the NSXMLParser i can retrieve the data from the local XML file, but the image path i had given in the XML file is not retrieving. The code below shows you in detail.
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Prices.xml"];
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
egsParser *theParser =[[egsParser alloc] initParser];
[xmlParser setDelegate:theParser];
From this code i can parse the data but don’t know how to retrieve the image along with this and show it in table view. The table view code is as below.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil){
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
theLists = [app.listArray objectAtIndex:indexPath.row];
cell.textLabel.text = theLists.title;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
Kindly suggest an idea to parse and show the image in table view from local XML file
Use the following code
as per your code it will be like below.
if you want to Retrive image from Saved Path