开发者

NSXMLElement undefined?

开发者 https://www.devze.com 2023-02-03 18:06 出处:网络
I am trying to use NSXMLElement to build an XML document in my app, but when i build i get an error w开发者_如何学编程hich reads \"NSXMLElement undelcared\".

I am trying to use NSXMLElement to build an XML document in my app, but when i build i get an error w开发者_如何学编程hich reads "NSXMLElement undelcared".

From what i can tell, NSXMLElement is part of the Foundation Framework, and should therefore be included with the rest of the framework with the line #include <Foundation/foundation.h>. Is this class not available for iOS(4.2)? Is there some other class that i can use?

TIA


Pretty sure NSXMLElement (at least currently - 4.2) isn't available under iOS.

From the "Migrating from Cocoa" section of the iOS Technology Overview docs:

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.

0

精彩评论

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

关注公众号