Linq读取XMl,要在输出多条记录 怎么做 求大侠
IEnumerable<XElement> xel = from e in xes.Elements("Node") where e.Element("NodeId").Value.ToString() == nodeId select e.Element("RoleList") ???;
------最佳解决方案--------------------IEnumerable<XElement> xel = from e in xes.Elements("Node") where e.Element("NodeId").Value.ToString() == nodeId select e ;
int count=xel.Count();
------其他解决方案--------------------var xel = (from e in xes.Elements("Node")
where e.Element("NodeId").Value.ToString() == nodeId
select e).ToList() ;