View Single Post
  #8 (permalink)  
Old 05-05-2008, 04:05 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 443
Last Blog:
Just over the next hil...
Credits: 45
Rep Power: 8
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default 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();
Reply With Quote