O'Reilly logo

Windows Phone 7 XNA Cookbook by Zheng Yang

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

Processing XML files

In game development, the XML file often plays the role of describing the whole game world, configuring the basic game settings or defining the object properties in the game scenario. For processing an XML file, the .NET framework supports several methods. In Windows Phone 7 XNA programming, if XML is a part of the game content, you can process the file in a way to suit your requirements. At present, the technique of writing the XML file importer and processor will help you. In the following recipe, you will learn this useful technique, and it is easy to extend for your own game.

How to do it...

The following steps will lead you to create the content importer and process for XML files:

  1. Create a Windows Phone Game project named ...

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