110,534
社区成员
发帖
与我相关
我的任务
分享
XElement xe = XElement.Load(@"D:\1.xml");
var query = from p in xe.Elements("flight")
select new
{
aircode = p.Element("aircode").Value,
price = p.Element("price").Value
};
foreach (var q in query)
{
Console.WriteLine(q.aircode + "\t" + q.price);
}