I will give a set of simple xml lines I found in w3schools XML example.
I want to know how I will be able to access these data from my Console application (I inserted a app.config into by console application project)
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</bookstore>
I’ll assume that you just want to read the XML data. It doesn’t really look like configuration so I suppose you’re better off putting this in a regular XML file.
You could parse the XML like this: