LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
gb119

XML Schema should support Variant Attributes

Status: Completed

Available in LabVIEW 2019 and later.

In the current LabVIEW XML Schema, the flatten to XML string supports variants, but not variant attributes (and by extension waveform attributes as well). This is unfortunate as variant attributes remain one of the best ways of implementing a dictionary type data structure and they are also a useful way of adding additional metadata to waveform signals. In both cases, serializing the attributes to XML strings properly would greatly facilitate data exchange with non LabVIEW code.

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
6 Comments
Darin.K
Trusted Enthusiast

Oh yes.  This has annoyed me on at least eleven non-consecutive occasions.

Active Participant

For what it's worth, you should be able to get all the variant attributes as an array of variants by leaving the "name" control disconnected, then you can push each of them into a Write to XML function in a FOR loop. Reverse the process for reading them back out to populate your dictionary.

gb119
Member

Just to note that the LV2019 map type is in the xml schema (but not the json schema) and has many of the benefots of the variant attributes.

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
AristosQueue (NI)
NI Employee (retired)

gb119 is correct. We did this in LV2019. I didn't realize there was an idea for this.

Untitled.png

Darren
Proven Zealot
Status changed to: Completed

Available in LabVIEW 2019 and later.

gb119
Member

Well there you go, another user contributed idea implemented - even if inadvertantly.... any chance of getting the json serializer working too?

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/