0

I have an xml file as follows,

  <?xml version="1.0" encoding="UTF-8" ?>
  <rss version="2.0">
   <channel>
    <title>XpertDox</title>
 <link>http://localhost:4000</link>
   <description>Find a doctor</description>


 <item>
<title>new feed2</title>           
<link>http://www.espncricinfo.com/</link>
<description>FinddddlklfggfsASAke</description>
</item>



<item>
<title>new feed</title>           
<link>http://timesofindia.indiatimes.com/</link>
<description>FinddddlklsASAke</description>
</item>

<item>
<title>w3schoolswdqeqweqw</title>           
<link>http://www.w3schools.com/html/default.asp</link>
<description>Finddddlklke</description>
</item>



<item>
<title>w3schools</title>           
<link>http://www.w3schools.com/xml/tryrss.asp?filename=rss_ex_guid</link>
<description>Finddddlklke</description>
</item>
 </channel>
 </rss>

My JS,

     getBlogList: function(currentPage, itemsPerPage, base_url) {
        var deferred = $q.defer();
        $http.get(base_url+'getBlogList', 
            {params: {currentPage: currentPage,itemsPerPage: itemsPerPage}}).then(function(data) {
            deferred.resolve(data);
        }).catch(function(results, status) {
            deferred.reject("An error occured while fetching items");
        });
        return deferred.promise;
    }, 

Here the task is whenever a new blog is added the content must come here and how can i achieve that?I completed have no idea of doing how?If i have a html ,i can easily bind data since its an xml i was confused.Can any one please help me...

2
  • whenever a new blog where? and content must come here where? Commented Aug 4, 2016 at 6:14
  • The content of new blog must come to the rss feed xml file and how to achieve it Commented Aug 4, 2016 at 6:15

1 Answer 1

1

You are going to need to create a serverside API. You can't do it in plain Angular. This all depends on what kind of serverside stack you are running.

Sign up to request clarification or add additional context in comments.

2 Comments

i am using node js
So from server (node js) I can write sitemap.xml correct? @adrian-brand

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.