gpt4 book ai didi

xml - NSXMLElement 未定义?

转载 作者:行者123 更新时间:2023-11-28 23:18:19 24 4
gpt4 key购买 nike

我正在尝试使用 NSXMLElement在我的应用程序中构建一个 XML 文档,但是当我构建时,我收到一条错误消息,内容为“NSXMLElement undelcared”。

据我所知,NSXMLElement是基础框架的一部分,因此应该包含在框架的其余部分中,行为 #include <Foundation/foundation.h>.此类不适用于 iOS(4.2) 吗?我可以使用其他类(class)吗?

TIA

最佳答案

很确定 NSXMLElement(至少目前 - 4.2)在 iOS 下不可用。

来自 iOS Technology Overview 的“从 Cocoa 迁移”部分文档:

The Foundation framework provides support for XML parsing through the NSXMLParser class. However, other XML parsing classes (including NSXMLDocument, NSXMLNode, and NSXMLElement) are not available in iOS. In addition to the NSXMLParser class, you can also use the libXML2 library, which provides a C-based XML parsing interface.

关于xml - NSXMLElement 未定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4674342/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com