Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1199 posts 2567 karma points
    Jan 20, 2014 @ 03:31
    Amir Khan
    0

    Loading content from external document

    Is there a way to load content from an external document in Razor? I'm trying to load some article abstracts from an XML feed, then link to the actual article and render it in a template.

    I found @File.ReadAllText but it seems to only work from a file on the actual machine...

    Any ideas?

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 20, 2014 @ 10:16
    Ismail Mayat
    0

    Amir,

    You write your own method to read from the feed where method is given feed source and some kind of identifier to xpath out the article? See https://www.nuget.org/packages?q=rss for some libraries you could use to parse the rss.

    Regards

    Ismail

  • Amir Khan 1199 posts 2567 karma points
    Jan 21, 2014 @ 17:47
    Amir Khan
    0

    Okay, this helps. Is there a way to actually create an Umbraco content node from each feed item?

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 21, 2014 @ 17:49
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies