【发布时间】:2010-07-24 21:02:30
【问题描述】:
var geoSettings = (from c in geoFields.Elements("Maps").Elements("Map")
select new
{
loc = c.Element("Location").Value
}).Distinct().Intersect(from p in terrainFields.Elements("Maps").Elements("Map")
select new
{
loc = p.Element("Location").Value
});
var flightCheck = from x in baseStations.Elements("BaseStation").Elements("Station")
// where (geoSettings.Location.Contains(x.Element("Location").Value))
select new
{
Flights = x.Element("FlightName").Value,
loc = x.Element("Location").Value
};
地图和基站都是 xml 文件。我被困在 // where(geoSettings.Location.Contains(x.Element("Location").Value)) geoSettings 是一个 IEnumerable。我怎样才能获得“位置”?
【问题讨论】:
标签: linq-to-xml