LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

XML: how to minimize the "angle bracket tax" in CVI

I need to share a lot of data from multidimensional arrays with XML. 

 

The "Angle Bracket Tax" is well known, and relates to the overhead of what goes inside the angle brackets, but it also has a coding side.

 

 

So far I have found the CVIXML instrument useful at providing the functionality I need, but my code seems unnecessarily dominated by the managing of nested element handles (creating, using, discarding).  It seems so clumsy compared to arrays with indices.  All that XML-related code buries the content I care about, which is the data I'm sharing.

 

Clearly another level of abstraction would help. Something flexible, generic, and geared around multi-dimensional arrays. 

 

Any chance someone has an example to share? Even some best practices or tips would be appreciated.

 

Thanks,

Ian

0 Kudos
Message 1 of 2
(3,253 Views)

multi-dimensionnal arrays ? you just can't compare xml and multi-dimensionnal arrays: a structure can't be represented in a multi-dimensionnal array, they do not fit the same purpose and the index of an array cannot represent the member of a structure. but if you had talked about associative arrays (aka dictionnaries)...

 

even with the best effort, my xml code also looks like yours. C is not good for dynamic arrays, automatic resource disposal and error handling. if you really want something light, then you will have to learn another language: python has a nice xml module which would fit your need perfectly, C++ might be a good bet too...

0 Kudos
Message 2 of 2
(3,235 Views)