XML for data files.

Started by
5 comments, last by pucca 16 years, 11 months ago
Hello, I am planning to use XMLs to store game data because most of the fields are hierarchical. I am therefore looking at using SAX with Xerces C++. But it seems way too complicated and makes me think about portability. Has anybody used Xerces?? How will it work out if I want to say, develop a very simple RPG?? Or am I better off reading files directly from the input stream. Thanks KVR.
Advertisement
I've used Xerces; it'll work out fine for your application, but I do believe there are simpler XML libraries. TinyXML is what I use.

One thing about XML: Be careful of inheritance relationships and references. You might need a unique-ID system to turn object pointers into reference IDs.
Quote:Original post by Ravuya
I've used Xerces; it'll work out fine for your application, but I do believe there are simpler XML libraries. TinyXML is what I use.

There is also TinyXML++ which is a slightly shinier (IMHO) version of TinyXML, and it's pretty easy to use.

Never used Xerces, so I can't comment on that.
Xerces works great after you get passed the rather steep learning curve.
TinyXML also implemented a SAX interface. However, it still uses DOM underneath so there is no efficiency gain. Anyway, that's what I use.
I use TinyXML for loading objects in my graphics engine, I would recommend TinyXML as well. It does have a small learning curve though.

[Edited by - blackcloak on May 23, 2007 12:42:48 PM]
Black CloakEpee Engine.
Hi there,

I will check out TinyXML and then decide which one to go with.
Thank you for your posts.

This topic is closed to new replies.

Advertisement