اخبار
public partial class MyWebPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// وضع الكود هنا
string ns = "http://www.sitemaps.org/schemas/sitemap/0.9";
string news_ns = "http://www.google.com/schemas/sitemap-news/0.9";
var feeds = from feed in feedxml.Descendants(string.Format("{{{0}}}{1}", ns, "url"))
select new
{
title = feed.Element(string.Format("{{{0}}}{1}", ns, "loc")).Value,
link = feed.Descendants(string.Format("{{{0}}}{1}", news_ns, "title")).Single().Value,
description = feed.Descendants(string.Format("{{{0}}}{1}", news_ns, "keywords")).Single().Value
};
// استخدام البيانات المحللة هنا
}
}