I have a problem. I need to loop through a xml and get a specific data.
I need to get for each <API-MAPPINGS>
all <MAPPED-ARGUMENT-TYPE>
and write them into a List.
I did like this:
foreach (var typemapping in maplist.Elements("API-
MAPPINGS").Descendants("TYPE-MAP"))
{
foreach (var mappedArguments in maplist.Elements("MAPPED-ARGUMENT-TYPE"))
{
newTypeMap.MappedArgumentType.Add(mappedArguments.Value);
}
}
But it's not working. Can somebody tell me please what I'm doing wrong?