Link to home
Start Free TrialLog in
Avatar of dtivmk
dtivmk

asked on

Accessing attributes in XML data passed as ArrayCollection

Hi,
If I have an XML list like this :

<?xml version="1.0"?>
<catalog>
 <clip desc="desc1">
 <title>check</title>
 </clip>
 <clip desc="desc2">
 <title>check2</title>
 </clip>
</catalog>

and I want to use it as a dataprovider to some tilelist, like this :
photoFeed = event.result.catalog.clip as ArrayCollection;

Then, if I want to access the attribute "desc" of clip,(inside
the datarenderer)
how do I do it?

<mx:TextArea text=????>
if I wanted the <title> part,
I could have done text="{data.title}"
but, what for the attribute "desc"?
Why is there no documentation for this?

I can do the following inside some actionscript code :
t.text = data["desc"];

but how do I do it inside mxml?

I also want to know, what actually happens, when
some XML data is passed as ArrayCollection to a
datarenderer? How does the ArrayCollection look like
if the input XML has child nodes(which may again
have attributes) and attributes
converted to the arraycollection.
ASKER CERTIFIED SOLUTION
Avatar of Savong
Savong
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dtivmk
dtivmk

ASKER

I have not looked at the solution yet, but am in a hurry since too many of my questions
are open and the account would be suspended if I don't take an action.