【问题标题】:TBXML Parsing Bug while parsing &TBXML Parsing Bug while parsing &
【发布时间】:2011-07-26 12:06:56
【问题描述】:

当我解析下面的 xml 时:

... <opp_brief> N & S nishu </opp_brief>...

使用以下行代码:

TBXMLElement *element10 = [TBXML childElementNamed:@"opp_brief" parentElement:element8];

if (element10 != nil) { NSLog(@"TBXMLLLLL::::: %@",[TBXML textForElement:element10]); }

NSLog 的输出是: TBXMLLLLL::::: N & S nishu

我不知道“amp;”从哪里来和...

任何人都可以帮忙....

【问题讨论】:

  • '&'是'&'对应的HTML实体

标签: objective-c xcode ipad parsing tbxml


【解决方案1】:

TBXML 显然没有提供任何选项来解决这个问题。在 SO 上查看这个问题:HTML character decoding in Objective-C / Cocoa Touch

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-02
    • 1970-01-01
    • 2015-05-12
    • 2019-04-26
    • 2016-09-18
    • 2011-03-17
    • 2014-09-27
    • 1970-01-01
    相关资源
    最近更新 更多