Kitts wrote: > I would like to know if there is any documentation on the XML file > format used within FlightGear.
First, note that the file format is used to generate a SGPropertyNode C++ object. So the details of how that class should drive your understanding of the on-disk representation. > All the XML files in FlightGear seem to include <PropertyList> as > the first node. Is this node name mandatory or can the name be > anything else? All XML files must have a top-level node. This is the one used by a property file. It is mandatory. > This is the generated XML but how does one read the attributes > present within the angled brackets? I am referring to the > information such as "bar n="1" type="double"". Property nodes have types, indicating what kind of data they store. This one is a "double", which corresponds to the built-in double precision floating poitn type. Property nodes also have numeric "indices" to order properties of the same name (e.g. "/controls/engine/engines[2]/throttle"). Note that these are not strictly required to be contiguous, they can have any number you like. But most code tends to assume a C-style array convention, where the first property has an index of zero. If the index is left out, then the property is assigned to the next highest index available. This is why the file you reference can leave out the n="0" index on the first <bar> nodes (although I'd argue that that's bad style -- either use implicit indices or explicit ones, but don't mix them). Andy _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d