开发者

How can I prevent NSXMLParser from exiting when it hits the copyright symbol?

I'm trying to use NSXMLParser to deal with an XML document. However, when a node开发者_运维技巧 has ® as an element value, the parser quits by using the parserDidEndDocument delegate method.

How can I prevent parsing from quitting when an ® symbol is encountered?


I would suggest 3 things:

  • Post here xml file example, so other people could test it
  • Try to define delegate's method parser:parseErrorOccurred: and see are any errors reported
  • Try to change file encoding to UTF-8 like that:

    <?xml version="1.0" encoding="utf-8"?>
    
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜