What is the easiest way to convert this XML document to my object?
问题 I have an XMLDocument that i need to read in and convert into a set of objects. I have the following objects public class Location { public string Name; public List<Building> Buildings; } public class Building { public string Name; public List<Room> Rooms; } and i have the following XML file: <?xml version="1.0" encoding="utf-8" ?> <info> <locations> <location name="New York"> <Building name="Building1"> <Rooms> <Room name="Room1"> <Capacity>18</Capacity> </Room> <Room name="Room2"> <Capacity