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:
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/listIn the folder
Source\XMLSupport
find the filesGDataXMLNode.h
andGDataXMLNode.m
and add them to your project.In your Project Navigator click on your Project.
To the right of this, click on your Target.
Go to the Build Settings tab.
Find the Search Paths\Header Search Paths setting.
Add
/usr/include/libxml2
to the list.Add
-lxml2
to the list.Import
GDataXMLNode.h
into your code. If it compiles...