You need to use deserialization.
System.Xml.Serialization will help you with this and specifically XmlSerializer.Deserialize() , you need to bring some preparatory work.
To do this, bring your xml file to this form (in the future you can return all parameters and their values removed from the opening tag):
<xml> <locations> <location id="1"> <level name="3" complete="True" stars="2" firstMisson="True" secondMission="False" thridMission="False" /> </location> <location id="2"> <level name="4" complete="True" stars="3" firstMisson="True" secondMission="True" thridMission="True" /> </location> </locations> </xml>
Then copy this content to the clipboard. In visual studio there is a very convenient feature, about which for some reason not many people know. When working with json or xml, there is no need to create a class for serialization manually. You need to create a new class file and delete absolutely all lines from it, then you just need to go through the path:
Правка(Edit) => Специальная вставка(special paste) => Вставить XML как классы(Paste XML as classes)
And the class for working with this XML will be created automatically.
Then you deserialize your XML and work with the object.
More details can be found here: https://msdn.microsoft.com/ru-ru/library/tz8csy73(v=vs.110).aspx
As it was said in the comments of the decisions can be really set. In my opinion this is one of the most convenient.