Adobe Dreamweaver Forums



Last 10 THreads :         Why is this not working!!! (Last Post : mickknight - Replies : 2 - Views : 3 )           »          Get the letter beneath the mouse cursor (Last Post : Raymond Basque - Replies : 2 - Views : 3 )           »          Interesting date query I need some help with (Last Post : -==cfSearching==- - Replies : 2 - Views : 3 )           »          Splash Screen is not been recorded... (Last Post : vratner - Replies : 4 - Views : 5 )           »          Tree drag and drop (move, copy to self) (Last Post : ntsiii - Replies : 1 - Views : 4 )           »          Please point me to the correct topic section of thisForum (Last Post : GillyWilly - Replies : 0 - Views : 1 )           »          Flash CS4 constant crashes (Last Post : dzedward - Replies : 2 - Views : 3 )           »          Download a Flash video? (Last Post : David Stiller - Replies : 1 - Views : 2 )           »          Spry repeat Region (Last Post : Hung Kuen Kung Fu - Replies : 0 - Views : 1 )           »          pdf question (Last Post : Joseph Kunz - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-26-2008, 07:41 PM
projectproofing
 
Posts: n/a
Diggs:
Default XML and XMLListCollection

I am trying to create a little datagrid to display topics from an XML feed. I
remember people using XMLListCollection to preformat the feed to use. What am I
doing wrong? I just want to pull the title and the link nodes for the datagrid.



mxml
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import mx.rpc.events.ResultEvent;

[Bindable]
public var RSSFeed:XMLListCollection = new XMLListCollection();

public function resultHandler(e:ResultEvent):void {
RSSFeed = e.result as XMLListCollection;
}

public function openURL(link:String):void {
navigateToURL(new URLRequest(link),"_blank");
}
]]>
</mx:Script>

<mx:HTTPService id="getXML"
destination="http://www2.med.umich.edu/prmc/media/ all.xml"
result="resultHandler(event)" resultFormat="e4x" />

<mxataGrid dataProvider="{RSSFeed}" id="feedsDG" showHeaders="false"
doubleClick="openURL(feedsDG.selectedItem.link);" width="148" height="286"
top="0" bottom="0" alternatingItemColors="[#336699, #336699]" fontSize="9"
color="#FFFFFF">
<mx:columns>
<mxataGridColumn headerText="Title" dataField="title"/>
<mxataGridColumn headerText="ID" dataField="ID" visible="false"/>
</mx:columns>
</mxataGrid>

RSS Feed
- <rss version="2.0">
- <channel>
<title>University of Michigan Health System</title>
<description>News from the University of Michigan Health
System</description>
<language>en-us</language>
<link>http://www.med.umich.edu/news</link>
<copyright>Copyright 2008, The University of Michigan</copyright>
<managingEditor>jesssoul@med.umich.edu (Jessica Soulliere)</managingEditor>
<webMaster>wkolcz@med.umich.edu (Wally Kolcz)</webMaster>
<lastBuildDate>Tue, 26 Aug 2008 9:12:31 EST</lastBuildDate>
- <image>
<title>University of Michigan Health System</title>
<url>http://www.med.umich.edu/1images/2logo.gif</u rl>
<link>http://www.med.umich.edu</link>
</image>
- <item>
<title>Film and panel to discuss hoarding</title>
<description>Film and panel to discuss hoarding</description>

<link>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=573</link>

<guid>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=573</guid>
<pubDate>Mon, 25 Aug 2008 11:00:00 EST</pubDate>
<category>Events</category>
</item>
- <item>
<title>U-M School of Nursing researcher wins $350,000 Robert Wood Johnson
Foundation grant</title>
<description>U-M School of Nursing researcher wins $350,000 Robert Wood
Johnson Foundation grant</description>
<link>http://www.ns.umich.edu/htdocs/releases/stor y.php?id=6694</link>
<guid>http://www.ns.umich.edu/htdocs/releases/stor y.php?id=6694</guid>
<pubDate>Mon, 25 Aug 2008 00:00:00 EST</pubDate>
<category>Business of Medicine</category>
</item>
- <item>
<title>Seventh Annual Men's Event</title>
<description>Seventh Annual Men's Event</description>

<link>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=556</link>

<guid>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=556</guid>
<pubDate>Tue, 19 Aug 2008 09:00:00 EST</pubDate>
<category>Cancer Research and Treatment</category>
</item>
- <item>
<title>Low level cadmium exposure linked to lung disease</title>
<description>Low level cadmium exposure linked to lung disease</description>
<link>http://www.ns.umich.edu/htdocs/releases/stor y.php?id=6686</link>
<guid>http://www.ns.umich.edu/htdocs/releases/stor y.php?id=6686</guid>
<pubDate>Tue, 19 Aug 2008 00:00:00 EST</pubDate>
<category>Basic Science</category>
</item>
- <item>
<title>U-M seeks participants to discover genetics behind epilepsy</title>
<description>U-M seeks participants to discover genetics behind
epilepsy</description>

<link>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=555</link>

<guid>http://www2.med.umich.edu/prmc/media/newsroo m/details.cfm?ID=555</guid>
<pubDate>Tue, 19 Aug 2008 00:00:00 EST</pubDate>
<category>PIBs</category>
</item>
</channel>
</rss>



Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:28 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk