So I got this idea last night to use an e4x expression as the source
of a chart and advanceddatagrid dataProvider. I’ve found that mostly
all of the “examples” online and in all the books only look at one
or(at most) two nesting levels inside of an xml document.
Unfortunately, my needs go beyond showing the number of apples or names
of people in a contact list. So here’s some background:
I have xml that is segregated in different levels, with the first
level being a generic role and the second level being one of a type.
There can be many different roles and many number of types under each
role. Within each type is a list of datapoints that correspond to the
specific role and type.
So last night I was playing around and was able to get my adg to
treat an e4x expression as the source by passing comparison values to
the attributes which in turn only loaded the data items of interest. My
e4x expression was sorta like this:
I got this to work a couple of times but the dataProvider was not
being modified once the values of the typeValue and roleValue changed.
So, like an idiot, I started hacking around trying to treat my e4x
expression as a solid data provider and it has since stopped working
altogether. If Im really nice, and standing in just the right point of
the room, I can get the dataProvider to load initially but ONLY for a
single attribute comparison ie myColl..role.(@id==someRoleValue) but
not for another level into the structure.
Any words of wisdom would be GREAT at this point. I want to use the
XML (or XMLListCollection if need be) as a dataProvider for my charts
and datagrid, but since I want to filter the values based upon parent
nodes (and be able to filter my data dynamically). I’ve made this work
with arrayCollections but I dont want to have to redo my webservices to
provide me with flat data just to get this to work. I would think this
is the VERY reason for e4x…besides acting as xml processing shorthand :D