Sign in to follow this  
pucca

XML for data files.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
TinyXML also implemented a SAX interface. However, it still uses DOM underneath so there is no efficiency gain. Anyway, that's what I use.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Hi there,

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this