A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: RSS Feed with 1 'undefined' node, and a backup plan needed!

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    21

    RSS Feed with 1 'undefined' node, and a backup plan needed!

    Hi,

    I have the following code that is a part of an XML object in my actionscript. It fills a dynamic text field (which is buried in a few symbols) with text from the RSS feed.

    Problem is, one of the nodes on the RSS feed is empty. When it's empty, my text field returns 'undefined'. I've tried with the code below to specify if the text is 'undefined', then it should display something else, like HELLO for instance.

    Code:
    var news = newsNode.item[rssCounter].description.getValue();
    	
    	if (news.htmlText == "undefined") {
    		_root.afterpreload.everything.ticker.newsmc.head.htmlText = "HELLO";
    	}else{
    		_root.afterpreload.everything.ticker.newsmc.head.htmlText = news;
    	}
    I've had no luck, as the feed just plays as normal returning an 'undefined' whenever I get to the node with no data.

    I've also tried...

    Code:
     
    
    if(news.htmlText == "") {
    ...but had no luck there either. Any help would be greatly appreciated.

  2. #2
    Junior Member
    Join Date
    May 2004
    Posts
    21
    Been solved, Cheers!

  3. #3
    Hi Aussie01,

    I know it was years ago, but can you remember how you solved this?

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center