NSXMLElement undefined?
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.
精彩评论