I use Xerces C++.
[edited by - cgoat on April 29, 2003 1:39:04 PM]
XML parser
quote:Original post by Kylotan
DOM or SAX? What access functionality does it allow? What's performance like?
Want to post code?
Now, I've kept this thing really simple, because it's just for crunching data for my game engine. Basically it consumes xml like:
?xml version="1.0" ?
folder name="console"
string name="promptbeg" ( /string
string name="promptend" )# /string
float name="max_lines" 200 /float
float name="max_remember" 20 /float
vec4 name="color" {0,0.2,0,1} /vec4
folder name="font"
string name="face" Arial /string
/folder
/folder
which can be accessed as follows:
xml xmlfile("file.xml");string promptbeg = xmlfile.get("/console/promptbeg");float max_lines = xmlfile.get("/console/max_lines");
Really simple, I'd admit, but it's fast as hell and it makes a very easy interface for storing preferences.
PS Anyone know how to post XML without having the damn bulletin board software strip your tags off?
[edited by - Ishan on April 29, 2003 2:21:08 PM]
[edited by - Ishan on April 29, 2003 2:23:13 PM]
[edited by - Ishan on April 29, 2003 2:48:28 PM]
quote:Original post by Anonymous Poster
what utility have a the web xml language in game programming?
A fancy .cfg I think.
If you wanted to go nuckingfutz, you could store your level data in zip-wad packed xml (kinda like Dungeon Seige).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement