Erik Hofman wrote:
Boris Koenig wrote:

I have now looked into dozens of source files, but I don't seem to be
able to find those files that are responsible for the XML handling,
respectively loading & parsing the PropertyList XML files, so I apologize in advance, but: what's the name of the classes that are used
or rather where do I have to look for this stuff ?


(I simply want to use FG's XML-handling capabilities for a specific function)


Do you want to parse XML yourself, or rather read an XML file into a property tree?

XML          : SimGear/simgear/xml/easyxml.?xx
Property Tree: SimGear/simgear/props/props_io.?xx

Hi Erik !

I have meanwhile looked into the these files - should have
known that this SimGear-specific and not FG stuff, though ;-)

However, there are two new issues:

1) While it wasn't a real problem to use easyxml.cxx's "readXML"
to simply copy  a XML file's structure to a particular node
within the property tree, there doesn't seem to exist a
similar wrapper for WRITING XML files within easyxml.cxx -
something like writeXML :-)

I have made a quick stab at it, but to be honest it doesn't
yet really work - anyway, is there going to be a simple
XML wrapper for writing added, or do you want me to
put that class into the fg_commands.hxx ?


2) While I as able to place a simple fgcommand within the fg_command.cxx file and added it to the array of commands at the end of the file, my impression is that I can only pass ONE parameter to any FGCOMMAND ?

So, for the dynamic menubar it wasn't really a problem,
because it only accepts a SGPropertyNode pointer, anyway.

But what I'd like to do now, is export to commands from
within fg_command that accept the parameters like stated
before:

fgWriteXML(SGPropertyNode * sourcepath,char* targetfilename);
fgReadXML(SGPropertyNode * targetpath,char* sourcefilename);

So, how exactly can I export a fgcommand that accepts these
parameters ?

Or is the only feasible way to copy the filename to another
node within the property tree node, and simply pass both
bits of information as ONE property tree ?



P.S.: I did read the commend in the fg_command.cxx files
about modules that can add new commands using:

        globals->getcommands()->addcom ...

Is there some standard loop to do exactly this for
NON-modules ? Or is using the array at the end of
the file, the best way ?


Thanks !


--------- Boris







_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to