【发布时间】:2012-12-25 17:17:56
【问题描述】:
我正在尝试从我的 xml 文档中提取最后 10 个元素,我正在使用此代码来解析它:
slideView.ItemsSource =
from channel in xmlItems.Descendants("album")
let id = channel.Element("catid")
let tit = channel.Element("name")
let des = channel.Element("picture")
orderby (int) id descending
select new onair
{
title = tit == null ? null : tit.Value,
photo = des == null ? null : des.Value,
};
请帮忙:) 谢谢
【问题讨论】:
标签: c# linq windows-phone-7 linq-to-xml