locked
Parse XML with SyndicationClient storage on local data

    Question

  • Hi everyone!

    I'm trying to use the SyndicationClient to make a request to the "ms-appdata:///local/" namespace but is not working, is there any way to do this.

    What I want to do is download the XML files from the server to the ApplicationData folder and the parse those files from there. Using SyndicationClient helps me to parse the RSS XML file.

    Thanks!

    Thursday, March 8, 2012 3:17 PM

All replies

  • Hi G,

    I can give this a shot in a sample program.  Before I do so, why are you downloading this information locally?  Why not process this from the URL instead and only save things you may or may not be interested in instead of saving what is available through the URL?

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, March 8, 2012 5:02 PM
    Moderator
  • Hi Jeff,

    I'm also looking for this feature. Reason? Sometimes the SyndicationClient takes too long to download the feeds from internet, like 20 seconds. So I would like to provide last available feed (which is stored locally) to user and then in background update to latest state.

    Andrej

    Tuesday, March 13, 2012 8:47 AM
  • Hi Andrej,

    So you want like a real-time RSS feed? :-)

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, March 14, 2012 1:04 PM
    Moderator
  • So to answer your questions... using the app local storage for items like images is different from trying to use it for a web request class and is not supported.  You can do <img src="" but not set the URI for web requests to app local storage.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, March 14, 2012 1:48 PM
    Moderator
  • Well I don't need real-time RSS feeds, i have looked for a way how to make the application faster. Currently I'm using this workaround:

    StorageFile feedFile = await storageFolder.GetFileAsync(localfile);
    SyndicationFeed feed = new SyndicationFeed();
    feed.LoadFromXml(await XmlDocument.LoadFromFileAsync(feedFile));
    doc = feed.GetXmlDocument(feed.SourceFormat);
    Andrej


    Wednesday, March 28, 2012 9:25 AM