In this tutorial we’ll see these things

  • Reading from local XML file that exits in the app
  • Reading data from XML and loading it into a list
  • Using XML for data binding

XML (Extensible Markup Language) data file (composed of tags as it’s a markup language) to define objects (+attributes) (API basically uses it, RSS feeds and many more things), we can use it to store text-based data.
Before we start, let’s take a look on the example of the XML file I’m using

Okay, create a new Windows Phone project, give it a name, go to the main page and add this XAML code

Now add this class (we’ll create an object which will store the data of every object we’ll load from the XML file)

And finally,  this code will load the data from the XML file into a list of the Writer class that we’ve just created and will fill the ListBox we used in XAML with this list as an ItemsSource

And don’t forget to include this namespace

Is there a bonus ?
I’m sorry there is no bonus included this time, but I’ll post a tutorial sooner on how to work with JSON (JavaScript Object Notation) data files

Thank you, here a sample available for download