O'Reilly logo

Windows Phone 7.5 Data Cookbook by Ramesh Thalli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Opening a local XML file

In this recipe let's try to open an XML file saved in the local application folder. We will make use of the XDocument parse method for opening the XML file. LINQ to XML is the best and the easiest way to navigate the XML for Silverlight applications. LINQ to XML replaced the XSLT transformation in C#.

Getting ready

For this recipe let's create a new project named Recipe1_LinqToXml under the solution folder named Ch3_Recipes. We will use this solution for all our samples in this chapter. Change the Application Name in the MainPage.xaml to LINQToXML. Press F5 and run to make sure you have no errors.

How to do it...

In the following steps we will create an XML file with sample data for our testing purposes and then we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required