ios 4 和 ios 5 ipad 之间的 XML 解析差异

发布于 12-23 17:54 字数 447 浏览 3 评论 0原文

我真的很难理解一些事情。在我得到的项目中,解析了一些来自soap Web 服务的XML。这在 iOS 4 中工作得很好。当我尝试在 iOS 5 模拟器或 iOS 5 设备中运行代码时,XML 无法正确解析。它给出了 NSXMLParser 域错误代码 4。

当我查看 XML 时,即使在工作操作系统中,来自 Web 服务的数据也有 <&gt; 而不是所有 XML 标记。但这似乎在 iOS 4 中仍然有效。在 iOS 5 中,我收到上面提到的错误和 错误请求 消息。我也无法按原样获取返回的 XML,到目前为止我只能在 NSData 中看到。

我想知道这是否是由于iOS版本的变化或其他原因造成的。我希望我说清楚了。也许即使有了这些信息,也会有一些答案。

提前致谢, 艾伦

I am having a real hard time understanding something. In the project I've been given, some XML coming from a soap web service is parsed. This works just fine in iOS 4. When I tried to run the code in iOS 5 simulators or a device with iOS 5, the XML is not parsed correctly. It gives NSXMLParser domain error code 4.

When I looked at the XML, even in the working OS, the data coming from the webservice has < and > instead of all the XML tags. But that seems to still work in iOS 4. In iOS 5, i get the error mentioned above and a Bad Request message. I also couldnt manage to get the returning XML as it is, so far I was only able to see in NSData.

I'd like to know if this may be caused by any change in iOS versions, or anything else. I hope I made myself clear. Maybe even with this info, there'll be some answers.

Thanks in advance,
Eren

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零度℉2024-12-30 17:54:48

NSXMLParserError 域错误 4 是 NSXMLParserEmptyDocumentError。听起来问题在于从 Web 服务检索原始 XML 文档以及 iOS 4 和 iOS 5 之间的一些变化。这应该会让您走上正确的轨道。如果可以的话,发布一些代码,我们可以提供更多信息。

The NSXMLParserError domain error 4 is NSXMLParserEmptyDocumentError. It sounds like the problem lies with the retrieval of the original XML document from the web service and some change between iOS 4 and iOS 5. This should get you started on the right track. Post some code when you can and we can give more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文