我在我的项目中使用XML,如Span text
span class="qt0">Fitness</span>and<span class="qt3">Exercise</span>
span文本可以转换为普通字符串.i尝试了所有代码我的输出将像Fitnessand Exercise
一样但是,我希望输出像这样Fitness and Exercise
谢谢。
答案 0 :(得分:-1)
NSRange ran;
NSString *san = snippetstr;
while ((ran = [san rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch]).location != NSNotFound)
san = [san stringByReplacingCharactersInRange:ran withString:@""];
snippetstr=san;