Library globals

Function globals . io . write_properties

View source

Write XML file in FlightGear's native <PropertyList> format.
Returns the filename on success or nil on error. If the source
is a props.Node that refers to a node in the main tree, then
the data are directly written from the tree, yielding a more
accurate result. Otherwise the data need to be copied first,
which may slightly change node types (FLOAT becomes DOUBLE etc.)

Usage:   io.write_properties(<filename>, <props.Node or property-path>);

Examples:

var data = props.Node.new({ a:1, b:2, c:{ d:3, e:4 } });
io.write_properties("/tmp/foo.xml", data);
io.write_properties("/tmp/foo.xml", "/sim/model");

Parameters

path

prop