XML for data files.
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.
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.
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.
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]
[Edited by - blackcloak on May 23, 2007 12:42:48 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement