- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 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/
我正在尝试使用 NSXMLElement在我的应用程序中构建一个 XML 文档,但是当我构建时,我收到一条错误消息,内容为“NSXMLElement undelcared”。 据我所知,NSXMLEl
我正在读取和写入的 XML 数据库的注释字段存储为 NSXMLElement 的属性。一项包含一个换行符 (0x0a)。这些由我解析为 的文档中的非 NSXML 编码器进行编码,并由 NSXML 正确
我正在尝试从下面提到的代码中检索“数字”。 4 我尝试了以下但它总是更新为“0”但我可以看到 iq 的数字与 0 不同 NSXMLElement *qu
我搜索了很多,找到了: func getAllRegisteredUsers() { do { var query: NSXMLElement = try NSXMLEleme
如何从自构建的 NSXMLNode 中获取 NSXMlelement 对象的属性的对应值。 最佳答案 [[element attributeForName:@"name"] stringValue]
抱歉,我不知道用什么术语来描述这个简单的事情。 我关注了this文章制作一个xml文档。但我想做这个 而不是 我该怎么做?我在文档中找不到它,我什至不知道如何用谷歌搜索它。谢谢! 最佳答案 当您创
有没有办法让 NSXMLElement 成为父级,而不是 NSXMLNode? 最佳答案 好的解决了...类型转换似乎可以解决问题。 NSXMLNode *manufacturer = [someNo
我使用 KissXML,它是 NSXMLDocument 等的替代品。这是我的 NSXMLElement 的内容: baker ˈbeɪkə baker пекарь, бу
我正在尝试使用 XPath 来解析 XML 文档。假设地说,我的 NSXMLElement 之一如下所示: 我正在尝试获取属性 bar 的值,但是我使用的任何代码解释都会返回 bar="woo",这
我正在创建一个 NSXMLDocument,从中获取一个在常量 USER_PRINTXML_URL 中定义的文件,如下所示: NSXMLDocument *ads_user_printxml = [[
对于我的应用程序,我必须保存一个 XML 文档,其中包含一些带有 HTML 文本的元素。作为结果的例子应该是: <p>Sample text.</p>
我正在开发 iOS 应用程序,我想获取 nsxmlelement 的命名空间。 我的 NSXMLElement *query 中有以下值。 我已经使用下面的代码来获取 xmlns 但它不工作
我正在尝试创建一个 XML 字符串,它应该包含单独的标签(即没有单独的结束标签的标签)我能够创建普通的 xml 标签,例如 使用代码 NSXMLElement *childElement=[[NSX
我是一名优秀的程序员,十分优秀!