I have some XML(see below) that I want to parse using Linq in C#.NET. I want to:
1. Count the number of hardware nodes
2. Read the value for each CardID under each Hardware node
3. Change the CardModel value under each Hardware node
I apologize for this over simplified version of what I am trying to accomplish, but I believe this hits on all the points.
I have tried the following code to simply count the hardware nodes, but the query contains no elements.
XElement root = XElement.Load(myXMLPath);
var query = from c in root.Elements("Hardware")