How to store the nodes of the following into Dictionary where int is an autogenerated Key and string (value of the node) using LINQ ?
Elements
How about:
var dictionary = instructors.Elements("instructor") .Select((element, index) => new { element, index }) .ToDictionary(x => x.index + 1, x => x.element.Value);