Collada Dom For iPhone

Hi! All,

I am working on a 3d engine for iPhone. I’m going to use opengl es and collada file format.

Is it possible to use collada dom in iphone for parse xml file?

Is there any body who is using TinyXML for parsing collada files? If yes, how is the experience.

Thanks in advance. :slight_smile:

Great and funny idea!
The COLLADA DOM compiles without any problems on MacOSX - therefor without further investigation - i’m quite confident that it will do so on the iPhone, too. Normally TinyXML is much slower than the corresponding libXML2 implementation (tested on Windows) but that should not be a problem on the iPhone.

Just give it a try and post your results here.

sebastian was right.
TinyXML is smaller but not faster than libXML2.
Prebuilded TinyXML libs for mac is on colladadom souceforge.
You can try it out.

I am very interested to see how well would the colladadom works in iphone.

Let me know if you have problem building it in iphone.

Thanks,
Herbert

To avoid XML parsing altogether you could write an XSL transform that creates an XML plist. Your project’s plist files are automatically converted to a binary format that can be loaded directly into memory when you create your iPhone application so there is no XML parsing overhead at all.

To read your values you would just do something like


NSString *path = [[NSBundle mainBundle] pathForResource:@"collada" ofType:@"plist"];
NSDictionary *colladaDictionary = [[NSDictionary alloc] initWithContentsOfFile:path];

See: http://developer.apple.com/documentatio … ist.5.html

I’m having some trouble compiling collada-dom on the iPhone …
it seems that XCode is having some trouble with one of the files, domTypes.cpp
the huge function in there creates some “branch link out of range” errors …
if I comment out the code in the function it compiles just fine …

anyone had any luck compiling it ?