Read a string/value between two strings.

lmsmi1 (56)
For my game, the weapon definition files are coded in XML format. I would like to make my own custom XML parser for the game. Say I have this:

<flag>FULLAUTO</flag>

And want to store "FULLAUTO" in a string value in the memory when the program is executed. So far I know I need:

1
2
3
4
5
6
7
8
#include <fstream>
#include <string>

using namespace std;

void main () {
    // what goes here to read the XML file?
}
MiiNiPaa (232)
Search for some XML parsing library. They are more efficient and easy to use than everything you can write now. Don't reinvent the wheel.

And why XML? Why not YAML/JSON?
Last edited on
lmsmi1 (56)
Okay, so no go on the custom XML parser. And which language do you guys recommend for weapon stuff for an FPS? My game is going to be like CoD...
Registered users can post here. Sign in or register to post.