Erik Hofman wrote:
Boris Koenig wrote:

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 :-)


Well, there is a writeProperties() function next to readProperties function in SimGear/simgear/props/props_io.cxx. If nothing else these functions could be copied or abused to do what you are looking for.

yes, thanks - I noticed these functions, too - so do you want me to place a writeXML function within fg_commands directly, or put it into simgear's easyxml.cxx ?


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 ?


Yep, thats the _root_ node of the property subtree you will be working on.

So, then I cannot add a simple fgcommand that accepts two parameters, but rather I would need to create a root node, that contains not only the subnodes for the XML file itself but also the filename and possibly other parameters ?

Hmm, that would mean that I would also need to export
copyProperties() as fgcommand in order to be able to
create such a root node easily, or I might be able to
recursively iterate through the XML file's properties
and copy each node manually using Nasal !?

Also, a new problem would then how I extract those
parameters from the SGPropertyNode pointer that
aren't mean to be used by a function that accepts
these pointers, so I would then need to extract
the String value of a certain node for the provided
pointer, is the method GetStringValue() the correct
one for that purpose ?


-------- Boris

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

Reply via email to