locked
Diplay contents of SharePoint in metro app RRS feed

  • Question

  • Hello

    I'm trying to display sharepoint lists in metro app. What I did is tried to read SP list through rest service and then trying to integrate the returned xml to metro tiles. the link i'm trying to use is in this format.

    WinJS.xhr({ url: "http://<servername>/_vti_bin/listdata.svc" }).then(function (rss) {

    And then, this is what i'm trying to do

    var items = rss.responseXML.querySelectorALL("item");

    for (var n = 0; n < items.length; n++) {

    var list = {};

                    list.title = items[n].querySelector("title").textContent;

    var thumbs = items[n].querySelectorAll("thumbnail");

    if (thumbs.length > 1) {

                        list.thumbnail = thumbs[1].attributes.getNamedItem(

    "url").textContent;

                        list.content = items[n].textContent;

                        articlesList.push(list);

                    }

                }

     When i run the metro app, it is running fine w/o any errors, but not displying anything. Cant figure out what I am doing wrong. Any help would be greatly appreciated.

    Thanks

    Wednesday, June 20, 2012 2:22 PM

All replies

  • What is articlesList?  What does your HTML look like? 

    Dave Paquette @Dave_Paquette www.davepaquette.com

    Thursday, June 21, 2012 3:35 PM
  • Hello

    I'm trying to display sharepoint lists in metro app. What I did is tried to read SP list through rest service and then trying to integrate the returned xml to metro tiles. the link i'm trying to use is in this format.

    WinJS.xhr({ url: "http://<servername>/_vti_bin/listdata.svc" }).then(function (rss) {

    And then, this is what i'm trying to do

    var items = rss.responseXML.querySelectorALL("item");

    for (var n = 0; n < items.length; n++) {

    var list = {};

                    list.title = items[n].querySelector("title").textContent;

    var thumbs = items[n].querySelectorAll("thumbnail");

    if (thumbs.length > 1) {

                        list.thumbnail = thumbs[1].attributes.getNamedItem(

    "url").textContent;

                        list.content = items[n].textContent;

                        articlesList.push(list);

                    }

                }

     When i run the metro app, it is running fine w/o any errors, but not displying anything. Cant figure out what I am doing wrong. Any help would be greatly appreciated.

    Thanks

    I try to done about the same but I can't figure out how to authenticate. Can someone help me out?
    Wednesday, January 22, 2014 1:23 PM