ios 4 和 ios 5 ipad 之间的 XML 解析差异
我真的很难理解一些事情。在我得到的项目中,解析了一些来自soap Web 服务的XML。这在 iOS 4 中工作得很好。当我尝试在 iOS 5 模拟器或 iOS 5 设备中运行代码时,XML 无法正确解析。它给出了 NSXMLParser
域错误代码 4。
当我查看 XML 时,即使在工作操作系统中,来自 Web 服务的数据也有 <
和 >
而不是所有 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 技术交流群。

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