[ODE] Parser in C++ for XODE files

Jon Watte (ODE) hplus-ode at mindcontrol.org
Sat Aug 18 13:00:54 MST 2007


XODE is, syntactically, a plain XML file (technically, a schema for 
interpreting plain XML files).

Parsing an XODE file into an XML node/hierarchy structure is simple, 
using any XML parser. I recommend TinyXML (small and quite capable), or 
XMLSCAN (really small, really fast).

Once you have parsed the file, you'll get a tree in memory representing 
the XML file structure/hierarchy. You have to then walk that tree, find 
nodes representing bodies and geoms, and creating those in your own 
world. The reason there's no single parser that does that for you, is 
that each game/simulation has different ways of tagging those 
bodies/geoms/joints -- they don't usually just live in the simulation; 
typically there's a tracking C++ object or C struct of some sort that's 
application specific. Thus, that's your job.

Cheers,

          / h+


vishwas rao wrote:
> But XODE has several other features, which a normal XML file might not have...
> so will a normal XML parser take care of those things??
> Vishwas
>
>
> On 8/19/07, Klaus Backert <Klaus.Backert at t-online.de> wrote:
>   
>> Am 18.08.2007 um 15:43 schrieb vishwas rao:
>>
>>     
>>> Hi ppl
>>> Do any of u have a parser for XODE files in C++??
>>> I have come across parsers in Java and Python but not in C or C++..
>>> If u have it please give it to me..
>>> Thanks..
>>> Vishwas
>>>       
>> Since, according to the documentation, XODE files are XML files,
>> every XML parser implemented in C or C++ will do, I think.
>>
>> Greetings
>> Klaus
>>
>>
>>     
>
>
>   


More information about the ODE mailing list