Skip to Content
0
Former Member
Oct 27, 2007 at 11:45 AM

Reading XML with Flex

28 Views

Ok I've gone through Ed's awesome Flex tutorial in the wiki but for some reason I simply can't nail this one.

	<mx:Label y="10" text="Craig's Movie List" id="lblTitle" enabled="true" horizontalCenter="0" fontSize="19" fontFamily="Arial" fontWeight="bold" fontStyle="italic"/>
	
     <mx:HTTPService id="httpRSS" url="http://creator.zoho.com/ccmehil/rss/30/" resultFormat="e4x" />
     
     <mx:DataGrid id="entries" verticalCenter="11" horizontalCenter="0" width="480" dataProvider="{httpRSS.lastResult.channel.item}" height="230">
		<mx:columns>
			<mx:DataGridColumn headerText="Name" dataField="title" width="300"/>
            <mx:DataGridColumn headerText="Rating" dataField="zc:Rating" width="50"/>
            <mx:DataGridColumn headerText="Type" dataField="zc:Genre"/>
            <mx:DataGridColumn headerText="Runtime" dataField="zc:Runtime"/>
		</mx:columns>
	 </mx:DataGrid>

The RSS looks like


<item>
  <title>Winnie the Pooh - A New friend for Winnie Pooh</title>
  <link>http://creator.zoho.com/ccmehil/view/30/record/7987000000110023/</link>
  <description><b>Title</b> : Winnie the Pooh - A New friend for Winnie Pooh<br/><b>Genre</b> : Zeichentrick<br/><b>Rating</b> : G<br/><b>Director</b> : <br/><b>Year</b> : <br/><b>Runtime</b> : 65<br/><b>Status</b> : Available</description>
  <guid isPermaLink="true">http://creator.zoho.com/ccmehil/view/30/record/7987000000110023/</guid>
  <zc:Title>Winnie the Pooh - A New friend for Winnie Pooh</zc:Title>
  <zc:Genre>Zeichentrick</zc:Genre>
  <zc:Rating>G</zc:Rating>
  <zc:Director></zc:Director>
  <zc:Year></zc:Year>
  <zc:Runtime>65</zc:Runtime>
  <zc:Status>Available</zc:Status>
</item>

So why can't I access the zc elements? What am I missing?