|
Sam, There are a few things I would change here. Lets back up a
bit: <?xml version="1.0"
encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="getXML.send()" layout="absolute"> <mx:HTTPService
id="getXML" url=""
resultFormat="e4x"/> <mx:List
width="100%" dataProvider="{getXML.lastResult.data.row}"
labelField="@name"/> </mx:Application> Here is a simple example that loads data from an XML file
called data.xml. I loaded the XML file with the following XML: <xport> <data> <row
name="1"/> <row
name="2"/> <row
name="3"/> <row
name="4"/> <row
name="5"/> <row
name="6"/> <row
name="7"/> <row
name="8"/> <row
name="1"/> </data> </xport> So first off, I changed the resultFormat of the
HTTPService tag to ‘e4x’ which is the default XML format in Flex
2/AS3. In the example I set-up a basic dataprovider specifying “getXML.lastResult.data.row”
as the binding. In E4X the root tag is ignored and paths begin within the root
tag hence the use of ‘data’. Additionally I mapped the labelField
property to the attribute name within item in the dataprovider. The list will
lookup the name attribute as data is set in the List row. Ideally this will get the XML data exchange working. Then
formatting the results into a AreaChart will follow. Regards, Ted Patrick Flex Evangelist Adobe Systems Incorporated From: Hi, -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- RE: [flexcoders] XML as a dataprovider Ely Greenfield
- RE: [flexcoders] XML as a dataprovider Ted Patrick

