Use an e4x expression.  They all return XMLList, so watch for that if you
need to assign a result to an XML var.  If you are sure there is only one
node in the result, do var xmlResult:XML = xmllistResult[0];

 

See the documentation for e4x syntax and usage, post back here if you have a
specific question or problem.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of AJC2357
Sent: Thursday, September 17, 2009 11:28 AM
To: [email protected]
Subject: [flexcoders] Declaring New Variable from XML Source

 

  

Hello, 

I have a large XML file that I use with Flex to graphically display specific
data. For example, it is easy to create a graph that shows GDP by country.
(which creates a graph for all countries in XML file)

But how can narrow or filter these searches? 

I want to have the graph show only the countries that are in region x for
instance. Can anyone show me how to create a new variable that is derived
from a subset of the XML file? 

I am new to actionscript but the logic would seem to be: create new variable
from XML source based on a given criteria (i.e., region == "Asia")

Any help?



Reply via email to