Reading XML data files
Finally, we have everyone's favorite data format: basic unadulterated XML. For this recipe, we will use Google's GDataXML library to read and parse a simple XML document. In the following scene, we see rocky terrain with some boulders and weeds:
Getting ready
Please refer to the project RecipeCollection01 for full working code of this recipe.
How to do it...
The first thing we need to do is integrate Google's GData XML tools:
- Download and unzip the
gdata-objectivec-client
from here: http://code.google.com/p/gdata-objectivec-client/downloads/list - In the folder
Source\XMLSupport
find the filesGDataXMLNode.h
andGDataXMLNode.m
and ...
Get Cocos2d for iPhone 1 Game Development Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.