PropertyList XML files: Difference between revisions

Jump to navigation Jump to search
m
courtesy of Philosopher: http://flightgear.org/forums/viewtopic.php?f=18&p=179989#p179985
m (courtesy of David Megginson (11 years ago): http://www.mail-archive.com/flightgear-devel@flightgear.org/msg10798.html)
m (courtesy of Philosopher: http://flightgear.org/forums/viewtopic.php?f=18&p=179989#p179985)
Line 14: Line 14:
* Nasal (props.nas, io.nas)
* Nasal (props.nas, io.nas)
* C++ APIs  
* C++ APIs  
There are several places to look for properties; one is in the aircraft files, another is all Nasal files, and the last place (and often most useful!) is grepping (searching) through the C++ code. To determine how a property works and what it does often requires looking through any code that uses it. This is a part of FlightGear that we could certainly document better .
As for the relationship between XML and the Property Tree, in some cases in FG (most notably preferences.xml and each AIRCRAFT-set.xml file), the <PropertyList> format directly defines properties in FlightGear's global property tree. In other cases, like the animation files given by /sim/model/path, those do not define properties but the <PropertyList> format is used as a matter of convenience so that FG can parse all of its XML files using the same mechanism and to keep the fundamental structure the same. XML has a lot of different dialects, and having only one for FlightGear really makes it easier, especially since it is very intuitive


The root element of each file is always named <PropertyList>. Tags are almost always found in pairs, with the closing tag having a slash prefixing the tag name, i.e </PropertyList>. The exception is the tag representing an aliased property. In this case a slash is prepended to the closing angle bracket.
The root element of each file is always named <PropertyList>. Tags are almost always found in pairs, with the closing tag having a slash prefixing the tag name, i.e </PropertyList>. The exception is the tag representing an aliased property. In this case a slash is prepended to the closing angle bracket.

Navigation menu