Span Letter不在Objective C中将字母从xml分隔为字符串

时间:2017-11-17 09:36:51

标签: html ios objective-c xml

我在我的项目中使用XML,如Span text

  

span class="qt0">Fitness</span>and<span class="qt3">Exercise</span>   span文本可以转换为普通字符串.i尝试了所有代码我的输出将像Fitnessand Exercise一样但是,我希望输出像这样Fitness and Exercise谢谢。

1 个答案:

答案 0 :(得分:-1)

                    NSRange ran;
                    NSString *san = snippetstr;
                    while ((ran = [san rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch]).location != NSNotFound)
                        san = [san stringByReplacingCharactersInRange:ran withString:@""];
                    snippetstr=san;