Я делаю разбор файла xml, извлекаю данные из файла xml и сохраняю их в массиве и далее в строках UITableView.Я хочу удалить лишнее слово в 5-м индексе '\ U2019' и хочу объединить слова 'i' и 'm all one' в одну строку для UITableView.
"WHERE DOES LOVE LIVE",
"TRANSFORMATION OF THE SELF",
"EMPATHY STRUCTURES",
"MORE QUESTIONS THAN ANSWERS",
I,
"\U2019",
"M ALL ALONE",
"THE WILL TO LIVE",
"THE GUILT OF SELF DENIAL",
HOPELESSNESS,
"SOCIAL WANNABIES",
"THE POWER OF HOPE"
связка кода:
- (UITableViewCell *)tableView:(UITableView *)tableViewcellForRowAtIndexPath:
(NSIndexPath *)indexPath
{ static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithFrame:CGRectZero];
}
if(indexPath.row > 0)
{ cell.textLabel.text = [blogtitle objectAtIndex: indexPath.row];
}}`
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSMutableString *)string
{
NSString *newString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
// save the characters for the current item...
if ( [currentElement isEqualToString:@"title"])
{
if ([newString length] > 0)
{
// NSMutableString *base64String = [newString base64EncodedString];
[blogtitle addObject:newString];
}
NSLog(@"blogtiltlearray...%@",blogtitle);
}}`