Is there any easy way to get the tree which is defined by a struct?
I have a project which needs to translate a binary file into xml, and if I had a method which returned the tree, it would be helpful to construct my translation table.
E.g.,
Struct('A', Struct('B', String('B1'), String('B2')), Struct('C', ULInt32('C1')))
would return something like
['A', ['B', ['B1', 'B2']], ['C', ['C1']]]
Of course Arrays, Unions, etc., would need to be represented as well somehow.
I was looking at writing a recursive function using subcon.subcons, and
subcon.name which might be private. This gets complicated, though, when dealing with arrays and other substructs.