Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User mkr10001's Avatar
    Join Date
    Apr 2008
    Posts
    13
    Hi I have an rss feed for a website and I wanted to put it in the rss reader widget but when i run it in the wrt ide it doesnt load it and when i install on my phone i get a network error message

    http://www.thisis50.com/profiles/blo...d=1&xn_auth=no

    here is the feed.

    does it matter that it isn't an xml?

  2. #2
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    Hi mkr10001,

    the feed seems to be ok. Which code are you using to retrieve and parse it?

    Pit

  3. #3
    Registered User eugeneo's Avatar
    Join Date
    Apr 2010
    Posts
    5
    This feed is atom. The widgets generated by Symbian WRT IDE and Aptana plugin only support RSS feeds. You would need to update parsing code in the FeedUpdateBroker.handleResponse

    Atom feed is still an XML document.

  4. #4
    Registered User mkr10001's Avatar
    Join Date
    Apr 2008
    Posts
    13
    Thanks for the replies guys.

    What I meant was it didn't end in .xml and I wondered if that was the problem.

    The code I'm using to retrieve it is just the default one from the RSS reader template and I'm afraid I wouldn't know how to update the parsing code.

    Cheers

  5. #5
    Registered User eugeneo's Avatar
    Join Date
    Apr 2010
    Posts
    5
    File extension does not matter. Reworking should be really straightforward. See FeedUpdateBroker handleResponse method:
    Code:
            var itemElements = xmlDoc.getElementsByTagName("item");
            for (var i = 0; i < itemElements.length; i++) {
                // iterate through child nodes of this item and gather
                // all the data we need for a feed item
                var title = null;
                var date = null;
                var description = null;
                var url = null;
                
                node = itemElements[i].firstChild;
                while (node != null) {
                    if (node.nodeType == Node.ELEMENT_NODE) {
                        if (node.nodeName == "title") {
                            // item title
                            title = this.getTextOfNode(node);
                        } else if (node.nodeName == "pubDate" || node.nodeName == "dc:date") {
                            // item publishing date
                            date = this.getTextOfNode(node);
                        } else if (node.nodeName == "description") {
                            // item description
                            description = this.getTextOfNode(node);
                        } else if (node.nodeName == "link") {
                            // link URL
                            url = this.getTextOfNode(node);
                        }
                    }
                    node = node.nextSibling;
                }
    Element names will be different but the general idea is just the same.

  6. #6
    Registered User mkr10001's Avatar
    Join Date
    Apr 2008
    Posts
    13
    Thanks very much I'll give that a go.

Similar Threads

  1. RSS feed not valid
    By TheSpook in forum Mobile Web Site Development
    Replies: 5
    Last Post: 2010-04-03, 03:27
  2. Why does my rss feed crash my widget
    By tbertram in forum Symbian Web Runtime
    Replies: 4
    Last Post: 2009-05-29, 13:26
  3. How to display same RSS feed in widget application?
    By SymbianTH in forum Symbian Web Runtime
    Replies: 7
    Last Post: 2009-05-27, 06:27
  4. How to read images from the RSS Feed URLs in JavaME
    By sreekanth288 in forum Mobile Java General
    Replies: 1
    Last Post: 2009-01-27, 11:48
  5. Getting group specific RSS feed from DiBos
    By miohtama in forum General Development Questions
    Replies: 3
    Last Post: 2008-09-03, 19:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved