为什么我的 Atom 数据绑定不起作用?
我有一个 Flex 应用程序,其中包含与 XML 和 Atom 提要绑定的高级数据网格。
使用我的 XML 文件,该应用程序运行得很好:
jiraList = new XMLList(event.result.channel.item);
但是,当我尝试访问 Atom feed 时,我不能低于“event.result”。
这可行:
clarityList = event.result as XMLList;
Alert.show(clarityList.toString());
但这不行:
clarityList = event.result.feed as XMLList;
Alert.show(clarityList.toString());
正如 Adobe 所解释的,我使用 Atom 命名空间:
private namespace atom = "http://www.w3.org/2005/Atom";
use namespace atom;
我的目标是能够将 Atom 提要与我的高级数据网格列绑定,因为它与我的 XML 提要一起使用。 我怎样才能做到这一点?
I've got a Flex application with Advanced Data Grids binded with XML and Atom feeds.
With my XML file, the application works very well:
jiraList = new XMLList(event.result.channel.item);
However, when I try to access Atom feeds, I cannot go lower than "event.result".
This works:
clarityList = event.result as XMLList;
Alert.show(clarityList.toString());
But this doesn't:
clarityList = event.result.feed as XMLList;
Alert.show(clarityList.toString());
As Adobe explains it, I use the Atom namespace:
private namespace atom = "http://www.w3.org/2005/Atom";
use namespace atom;
My goal is to be able to bind the Atom feed with my Advanced Data Grid Columns, as it works with my XML feed. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
命名空间必须用于限定属性(元素)访问。 ActionScript 属性名称实际上是命名空间限定的,但很少以这种方式使用。 可以说,XML 倾向于使这个主题“浮出水面”。
Namespaces must be used to qualify the property (element) accesses. ActionScript property names are in fact namespace-qualified, but rarely used this way. XML tends to bring this topic "to the surface" so to speak.