ASP.NET RSS feed error in link tag in item node? Issue with Razor in Umbraco RSS Feed

veJaonsure

New Member
Having an issue with creating an rss feed against a blog in umbraco using razor. The code below works but as soon as I try and add any value into the link tag under the item node I get an xml error, below is the code. \[code\]<rss version="2.0"> <channel> <title>@landing.uBlogsyRssTitle</title> <description>@landing.uBlogsyRssDescription</description> <copyright>@landing.uBlogsyRssCopyright</copyright> @*<image>@landing.uBlogsyRssImage</image>*@ <link>@[email protected]</link> <lastBuildDate>@lastPubDate.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss")</lastBuildDate> <pubDate>@lastPubDate.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss")</pubDate> @foreach (var p in posts) { <item> <title>@p.GetProperty("uBlogsyContentTitle").Value</title> <link></link> <author>@p.GetProperty("uBlogsyPostAuthor").Value</author> <description>@p.GetProperty("uBlogsyContentBody").Value.StripHtml().Trim()</description> <guid>@p.Url</guid> <pubDate>@p.GetProperty("uBlogsyPostDate").Value.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss")</pubDate> </item> }</channel></rss>\[/code\]
 
Back
Top