Hello!
Help me please)
why it is impossible to make group by attribute of xml file:
XElement po1 = XElement.Load(sourseFile);
IEnumerable<XElement> childElements1 = from el in po1.Elements("ROW") select el;
var query = childElements1.GroupBy(row => row.Attribute("Atr"));
foreach (var item in query)
{ textBox2.AppendText("Group key = " + item.Key + " \r\n");
foreach (var inner in item)
{
textBox2.AppendText("inner.Value = " + inner.Attribute("Sl") + " \r\n");
}
}
Thanks!
-
Перемещено
SachinW
1 октября 2010 г. 22:14
MSDN Forums Consolidation (От:Начинающие разработчики)