Flex 2 MXNA RSS Reader Example

Posted on July 4, 2006 | 8 comments

This example RSS Reader is specific to reading the Macromedia XML News Aggregator (MXNA).
MXNA can be found here http://weblogs.macromedia.com/mxna/.

This example shows how to load external XML data (ie: RSS feed or Atom feed) and parse through the data.
It display the data using a repeatar class and uses navigateToUrl to provide links back to the
blog posts themselves.

To see the application run go to http://renaun.com/flex2/MXNARSSReader/
To see the application’s source code go to http://renaun.com/flex2/MXNARSSReader/srcview/

  • Vik

    good example

  • MySchizoBuddy

    Can u show how would make a rss reader for video podcast. So all the quicktime videos play inside flex

  • http://www.jabbypanda.com JabbyPanda

    Good example, Renaun.

    I had used your source code in my own RSS reader and it worked fine.

    I also had compared your RSS parser with Adobe’s open sourced class “com.adobe.xml.syndication.rss.RSS20″ from Adobe Labs available fro http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries#RSS_and_Atom_libraries

    Both work fine!

    But I had hit the Adobe Flash Player 9 Security Sandbox rules
    (http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf).

    I cannot load XML file in RSS format from the remote server using URLRequset object if that remote server does not contain “crossdomain.xml” with content:
    ——-

    ——-

    For example:

    1) XML file in RSS format “http://feeds.feedburner.com/MicroPersuasion”
    CANNOT be loaded due to Security Sandbox rules

    1) XML file in RSS format “http://weblogs.macromedia.com/mxna/xml/rss.cfm?query=byCategory&languages=1&categoryId=5″
    CAN be loaded due to Security Sandbox rules.

    What will be your advice to avoid it? We are currently thinking of using tunneling at the server-side to allow Flex 2 basd client to access any remote RSS feed, not just allowed by security policy in Adobe Flash player 9.

  • http://www.renaun.com Renaun Erickson

    Thats about all you can do. Make a proxy server where you have control of the crossdomain.xml and have that server make the calls to go get the XML feeds.

    Its all because of the need to sandbox the Flash Player, it limits some situations but it saves a lot of security issue headaches.

  • JabbyPanda

    Thanks Renaun for an inspiration and your answer.

    We had went through Flash Player Technote article ” Loading data across domains” http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16520 and had installed proxy Java servlet as suggested.

    Now, our RSS reader can load any remote RSS feed via this proxy which is good thing because the end user does not want to know anything about Flash player security sandboxes.

    The only drawback found already by me of this proxy Java servlet, that it FAILS to load RSS feed from:
    http://weblogs.macromedia.com/mxna/xml/rss.cfm?query=byCategory&languages=1&categoryId=5
    , but I will change the order of URL parameters, this proxy Java servlet will SUCCEED to load RSS feed from:
    http://weblogs.macromedia.com/mxna/xml/rss.cfm?languages=1&categoryId=5&query=byCategory

    I suspect this behavoiur occurs because
    “http://weblogs.macromedia.com/mxna/xml/rss.cfm?query=byCategory” is not valid RSS feed anytime

  • http://www.renaun.com Renaun Erickson

    Glad it worked, and thanks for the heads up on the MXNA url parameter issue.

  • Venix

    Can any of you guys give me the source for a proxy for this RSS reader?

    I’ve been trying to create one all day, to no avail, and am getting quite frustrated. I just want to get passed the cross domain issue ( as most RSS feeds lack a crossdomain.xml )

  • http://www.grindstonemedia.net ryan

    hey venix take a look at php and curl. you should be able to write a pretty simple php proxy using php’s curl api.

  • Pingback: Flex and Cairngrom Architecture « Vengatc techology logs