...then all I have to do to define the whole structure and sub-structure
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE

persistent room rm[2] //THIS DEFINES TWO ROOMS with all the data cells of the sub-structures underneath them

Then to get to any cell in the structure:
stored_volume = rm[this_rm].d[this_device].a[1].ch[this_ch].val

...hope that helps if you're still struggling with building and using structures.

I use variable to string and string to variable to pass updated structures, a single level, from modules back to the main all the time and use variable to xml to store data on the flash that are 3 levels deep. I've never noticed corrupted data but to be honest I haven't looked for it either.

I am curious to see it work, I spent a good amount of time on it several years ago. A customer wanted a config file that was human readable and editable outside of the control code. I ended up going with a binary file because every time I tried to generate the XML file (using VariableToXML) with nested structures the XML output was corrupt.

"JasonS
I am curious to see it work, I spent a good amount of time on it several years ago. A customer wanted a config file that was human readable and editable outside of the control code. I ended up going with a binary file because every time I tried to generate the XML file (using VariableToXML) with nested structures the XML output was corrupt."

This is a case where I might jut roll my own file reader. Pinning your hopes on the user getting a file format right every time is a pretty dicey prospect. This might be a good case for a good old fashioned CSV file which Excel et al can open easily enough and even if the format gets jacked up, you cam wrote sp,e cpde to deal with it and repair.

@ericmedley
We use XML editing programs to edit our config files. Using XML allows us to enforce the structure of the XML file as well as the data that is entered. e.g numerical or alpha can be enforced.
The example provided is for pre-configuring systems. Once the main code is loaded it looks for an existing XML, if one is found and the system is configured by that file. If there are errors in the file they are displayed on the touch panel and in debugging. If a file is not found a fresh one is written to the master.
This system is very handy when you have to roll out 200+ rooms at a university during summer break!