RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
XMark
Guitar playin' black mage


Joined: 30 May 2002
Posts: 870
Location: New Westminster, BC, Canada

PostPosted: Thu Apr 07, 2005 10:30 pm    Post subject: XML parser library [quote]

I was wondering if there's an easy-to-use XML parser library out there (for MingW) that I can put into my project? It's for storing information on items and enemies and stuff, I'm basically just going to be using the hierarchical storage capabilities like so:

Code:

<enemy>
   <name>Imp</name>
   <maxhp>30</maxhp>
   <maxmp>0</maxmp>
   <otherstuff>et cetera</otherstuff>
</enemy>
<enemy>
   <name>Magician</name>
   <maxhp>22</maxhp>
   <maxmp>10</maxmp>
   <otherstuff>whatever</otherstuff>
</enemy>


so I don't need anything fancy, just something so I can easily grab the data and stuff it into memory at load time.
_________________
Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
Back to top  
DrunkenCoder
Demon Hunter


Joined: 29 May 2002
Posts: 559

PostPosted: Thu Apr 07, 2005 10:54 pm    Post subject: [quote]

I've only heard good things about TinyXML maybe that's worth a look.
_________________
If there's life after death there is no death, if there's no death we never live. | ENTP
Back to top  
XMark
Guitar playin' black mage


Joined: 30 May 2002
Posts: 870
Location: New Westminster, BC, Canada

PostPosted: Fri Apr 08, 2005 12:23 am    Post subject: [quote]

hey, I was looking at the TinyXML documentation, apparently you just have to run one line of code and BAM it's all stored in memory and arranged in objects for you. Sounds nice... I'll play with it when I get home
_________________
Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Fri Apr 08, 2005 1:51 am    Post subject: [quote]

There's also libxml2, which will load/parse your XML documents for you, arrange them, if you wish, into snazzy, easy to decode trees, and, if you want, provide several different forms of document validation. For instance, it has the capability to validate loaded documents against Relax NG schemas, which is useful, if you're into that kind of thing.

But yeah, it's pretty simple to use, and should be available for most GNU based C-compilers. xmlsoft's examples can pretty much walk you through the more rudimentary aspects of the library.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
Mandrake
elementry school minded asshole


Joined: 28 May 2002
Posts: 1341
Location: GNARR!

PostPosted: Tue Apr 12, 2005 3:02 pm    Post subject: [quote]

TinyXML is insanely simple to use, and loads of fun to boot. You can access the tree using long and drawn it IE DOM style specifications, or if your handy with a pointer you can traverse the tree in a pretty nifty way.
_________________
"Well, last time I flicked on a lighter, I'm pretty sure I didn't create a black hole."-
Xmark

http://pauljessup.com
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum