i have a LINQ query for my XML file and it looks like this
IEnumerable<XElement> c = from cli in xEl.Elements(ns + "client")
where cli.Element(ns+"ID").Value == (((Client)cComboBox.SelectedItem).Id +"")
select cli;
it works fine.. Next i want to iterate that data so i do this
foreach (XElement el in c)
{
}
my xml file looks like this
<client>
<ID>1</ID>
<name>Andrej</name>
through that iteration, i want to extract clients values (id -> 1, name -> Andrej)
my guess was to put el.Element("name").Value in the middle of the loop, but that doesn't work...
oh and btw: i'm doing this in C#..
What do i do?
btw2: as you can see i'm new to linq so i think i'm way off track with this one...
Any help would be appriciated!! TNX!