Objective c TFHpple仅解析前面的文本<;br>;标签

Objective c TFHpple仅解析前面的文本<;br>;标签,objective-c,hpple,Objective C,Hpple,这是HTML: <p id="content">Every Sunday, our Chef proposes a buffet high in color. <br> A brunch either classic or on a theme for special events <br> Every Sunday at the restaurant </p> 我想解析之间的所有文本,而不解析 有人能帮我吗?NSString*webSIteSo

这是HTML:

<p id="content">Every Sunday, our Chef proposes a buffet high in color.
<br>
A brunch either classic or on a theme for special events
<br>
Every Sunday at the restaurant
</p>
我想解析

之间的所有文本,而不解析

有人能帮我吗?

NSString*webSIteSource=[NSString stringWithContentsOfURL:[NSURL URLWithString:u]编码:NSUTF8StringEncoding错误:nil];
 NSString*  webSIteSource=[NSString stringWithContentsOfURL:[NSURL URLWithString:u]encoding:NSUTF8StringEncoding error:nil];

    webSIteSource=  [webSIteSource stringByReplacingOccurrencesOfString:@"<br />"withString:@" "];
    webSIteSource=[webSIteSource stringByReplacingOccurrencesOfString:@"<blockquote>" withString:@" "];
    webSIteSource=[webSIteSource stringByReplacingOccurrencesOfString:@"</blockquote>" withString:@" "];
webSIteSource=[webSIteSource stringByReplacingOccurrencesOfString:@“
”with string:@”“; webSIteSource=[webSIteSource stringByReplacingOccurrencesOfString:@”“with String:@”“]; webSIteSource=[webSIteSource stringByReplacingOccurrencesOfString:@”“with String:@”“];
只需将所有网站内容伪装成nsstring,然后删除所有“br”标签! 就这样

_currentBody.text = ele.content
你可以试试

_currentBody.text = ele.content