Software Archive
Read-only legacy content
17061 Discussions

Import my RSS (news feed) from my site to my app

Kiriakos_T_
Beginner
444 Views

Is there any way to import my RSS (news feed) from my wordpress site to my intel XDK application (App Framework 3) without any third-party sites?

0 Kudos
7 Replies
PaulF_IntelCorp
Employee
444 Views

You cannot import wordpress code into the XDK, since it is normally PHP server code. You certainly cannot use wordpress plugins in a Cordova app, they are not compatible. What you'll have to do is uncover the process used to collect, read and process your wordpress rss feed code and rewrite it into a format that works with a Cordova app.

0 Kudos
Kiriakos_T_
Beginner
444 Views

What about web services(RSS reader) in the XDK?

0 Kudos
PaulF_IntelCorp
Employee
444 Views

The web services are great examples of how to interact with an external server. Please use them as an example of how it can be done. However, they do not provide the server component, only the client component. The web services code is interacting with existing public servers that are providing RESTful APIs.

0 Kudos
Kiriakos_T_
Beginner
444 Views

ok great.. is it functionable right now? Because web services had some issues before.. and I think the problems still remains..

0 Kudos
PaulF_IntelCorp
Employee
444 Views

Occasionally the providers will change their APIs, which can cause a specific web service to quit working, but that does not mean that ALL of them are no longer working. It is simply a collection of JavaScript libraries showing one way to access a variety of popular RESTful APIs. You can modify the code to meet your needs, use it as an example of one way to work with a server, it does not represent the only way to do this sort of thing.

0 Kudos
Kiriakos_T_
Beginner
444 Views

the following script seems to show my RSS-news-feed but doesn't make any refresh/update when a new post is made. Is there any solution for this?

<script>
  $(document).ready(function() {
    var feed = "https://www.collatio.eu/test/feed/";
    $.ajax(feed, {
        accepts:{
            xml:"application/rss+xml"
        },
        dataType:"xml",
        success:function(data) {
            
            output = '';
            $(data).find("item").each(function () {
                var el = $(this);
                output += '<div class="rss-post">';
                output += '<h2><a >'+el.find("title").text()+'</a></h2>';
                output += '<div class="rss-post-content">'+el.find("description").text()+'</div>';
                output += '<strong><a class="btn btn-primary" href="'+el.find("link").text()+'">Read Full Post</a></strong>';
                output += '</div>';
               
            });
            
            $('#rss-feeds').html(output);
           
        }   
    });
      
});
    
 
</script>

0 Kudos
Giselle_G_Intel
Employee
444 Views

Unfortunately we don't have the resources to help with general coding issues. Try searching online on stack overflow. For instance, check out this stack overflow discussion >http://stackoverflow.com/questions/10943544/how-to-parse-an-rss-feed-using-javascript< or try searching: load rss feed javascript. Either of these will provide a good jumping off point to figure out what you need to about RSS Feeds. The stack overflow discussion does it a little differently but you can try this and see if it refreshes.

0 Kudos
Reply