I've extended a RSS feed with custom fielditems, eg, with an image url (http://linktoimage
I'm reading the RSS feed with:
SyndicationFeed feed = await client.RetrieveFeedAsync(new Uri(feedUrl));
But in order to read the new element I need to extend the SyndicationFeed with the items (it takes one a handfull of default RSS items). I couldn't find a recent example of how to do this. Most code available could not be aplied to a Win8 app. Closest I found was:
i.ElementExtensions.First(element => element.NodeName == "imgurl").NodeValue);
But this this caused an exception error. When looked at the value of the element it show's me the published tag instead of the value. I expected it to find the first imgurl tag and return the value of it. Just as it does in the code where i found the code ( http://code.msdn.microsoft.com/windowsapps/XAML-Twitter-Client-e343d336 )
How can I read a nd the extra xml tags i've added to the feed (as a string) when using "SyndidationFeed"?
The best way of doing this is using LINQ. For example, reading a WordPress RSS (pay attention to the commments):
This way you can get all the attributes or tags you want, you can even asign functions to them passing a tag and returning only an image source, for example.