RE: XML was RE: [GD-General] RE: A portable preferences library
Brought to you by:
vexxed72
From: Richard S. <Ric...@ei...> - 2003-12-16 12:39:35
|
> > 1. Because developers are already using XML and have since thrown > > away, forgotten or don't want to write a parser. > Just curious, what is the footprint of the XML parser you are=20 > using? I know > some that are like >3MB of binary code. That stuff gives me=20 > the creeps. Perhaps you have some lightweight one? There are parsers to suit all needs. The largest fully validation parsers with spoinks and added wurlitsers are in the couple of meg=20 area. Micro parsers with no valdation can be as small as a couple of=20 K. A quick google showed a large number of XML parsers which claimed to be small and fast. Several were open source. I'm pretty sure it would be easy to find one that suits. > Also, what kind of info are you people storing in XML files?=20 > I often hear > comments about how XML is so great that we should store=20 > everything in it. Ah, no :*) People who say that tend to be application programmers or web monkeys, where size of data or speed of parsing tends to be less important. XML shouod be used to store data where the=20 format gives it lots of added value. Broadly speaking (very broadly) XML is going to be of much more use to AI programmers, gameplay programmers and designers. I'm not a graphics programmer, but I can't really see a case where=20 it would be any good for holding data about vertices, or any other graphics data, as someone asked elsewhere in the thread. However, for holding game object initialisation data for a component based system, it is a godsend. For representing game rules or formulae, it is extremely effective. Entire game AI can be represented, whether it be a state based system, a rules based system, goal orientated or emergent. The entire system can be expressed in validated XML allowing designers to modify any element to their hearts content. It ensure syntax safety so they can't break anything. You can also use it to enforce symantic safety though generally I'd prefer to do that in code. XML is there to provide us the mechanism for giving them this data=20 driven architecture they keep saying they want. It's certainly not there to give us a better way of representing our graphics data. > Alen Rich |