0

hello , I am creating a map format for a game I'm making and I'm hoping to use xml. Can anyone tell me how to access elements using tinyxml ? or at least how create some sort of pain text parser ?

Thanks in advance !
A Novice C++ Programmer

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by wwsoft
0

hello , I am creating a map format for a game I'm making and I'm hoping to use xml. Can anyone tell me how to access elements using tinyxml ? or at least how create some sort of pain text parser ?

Thanks in advance !
A Novice C++ Programmer

You can write your own XML writing and reading classes.
You can use fstream.

There are some existing parsers.Just google for them.

How do you plan to store your data?

0

I gave up on xml and made a good text one in 2 hours

Example.wwsm

//== White Waters Software Map file [WWSM] ==\\

// ~4 = standard object input OXYZ
// ~7 = teleport object input OXYZXYZ

Battle // map name
Fight Etc ... // description 
Jason White // creator

//== map attributes ==\\

5         // sizex * 128
5         // sizey * 128
black     // background col

-1        // soundtrack
NULL      // path to soundtrack in ./data/

////data   input flag;object,x,y,z

~4;player,10,10,0
~4;dog,0,0,0
~4;sword,30,443,10
~7;teleport,10,10,0,30,30,0

Edited by wwsoft: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.