开发者

§ character kills nsxmlparser

开发者 https://www.devze.com 2023-01-20 09:52 出处:网络
I\'ve got an nsxmlparser. It works well enough, though I had to convert a开发者_运维知识库ll the special characters coming into it into their coded equivalents: & had to be &, \" had to be

I've got an nsxmlparser. It works well enough, though I had to convert a开发者_运维知识库ll the special characters coming into it into their coded equivalents: & had to be &, " had to be ", and so on. However, § (§) kills it at parser:didStartElement.

Do you know a way around this? Naturally, I need the § characters to show up.


There's a workable answer in the comments to the question:

"Have the server send "§" in place of "§" and then just run the following line on the clientside:

labelText = [labelText stringByReplacingOccurrencesOfString:@"§" withString:@"§"];

I'd hope there's a more graceful way, though

0

精彩评论

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

关注公众号