Book Image

Windows Phone 7.5 Data Cookbook

By : Ramesh Thalli
Book Image

Windows Phone 7.5 Data Cookbook

By: Ramesh Thalli

Overview of this book

Windows Phone 7.5 Mango contains support for apps written in Silverlight or XNA. These apps can store data on the device, and also load and manipulate data from "the cloud" and other web services.This Windows Phone 7.5 Data Cookbook has a range of recipes to help you apply data handling concepts. You will be able to apply the knowledge gained from these recipes to build your own apps effectively. This Windows Phone 7.5 Data Cookbook starts with data binding concepts at the UI layer and then shows different ways of saving data locally and externally in databases. The book ends with a look at the popular MVVM software design pattern. The recipes contained in this book will make you an expert in the areas of data access and storage.
Table of Contents (15 chapters)
Windows Phone 7.5 Data Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Opening a remote XML file


In the first recipe Opening a local XML file, we opened an XML file from the local folder; now let's try opening an XML file from a remote location.

Getting ready

  1. Create a new project called Recipe3_RemoteXml under Ch3_Recipes.

  2. Open your local IIS (Internet Information Services) root folder and copy the XML file MyTasks.xml we created in the preceding recipe.

  3. You can also host this file in any remote server, which can be accessed using a simple URI. For this recipe, let's copy the XML file to localhost's root folder. You can learn more on how to install the IIS on your machine using this link: http://learn.iis.net/page.aspx/28/installing-iis-7-on-windows-vista-and-windows-7/.

  4. Navigate to the file using the browser and the following link http://localhost/mytasks.xml. It should look like the following screenshot:

How to do it…

In the following steps, we will create a form to collect the remote XML file location information in a textbox control, and then using the WebClient...