Re: XML parser in Java
Essentially it breaks down to writing a state machine that recognises the tokens. Creating a struct/class representing each token. Modifying the state machine so that it creates such a class for each token it reads then adds it to a queue. Then write a parser that can read the token queue and generate a tree from it.
Once you have your tree you'll need to write any tools to manipulate it (change the values at various points, add/remove elements etc) and convert it back into a text format.
__________________
Code:
glBegin(GL_TRIANGLES);
drawWorld();
glEnd();
|