🔒 Locked
XML parser
Advertisement
Original Post
Helo
I am yust starting to use TinyXML and I must say that is
easy to use, fast, averything you want from a xml parser!
Bye!
I am yust starting to use TinyXML and I must say that is
easy to use, fast, averything you want from a xml parser!
Bye!
can someone post a link? I googled for it but only found java versions and the home page was down
quote:
Original post by Ishan
Oh come on, be a real man / woman and write your own.I hammered one out in an afternoon, and it only took 150 lines.
DOM or SAX? What access functionality does it allow? What''s performance like?
Want to post code?
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
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]
If you wanted to go nuckingfutz, you could store your level data in zip-wad packed xml (kinda like Dungeon Seige).
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement