tags:

views:

121

answers:

1

Hi guys

To make it simple, 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.

Thanks 4 help !!

A: 
private namespace atom = "http://www.w3.org/2005/Atom";
use namespace atom;

clarityList = event.result.atom::feed as XMLList;
Alert.show(clarityList.toString());

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.

verveguy