Showing results for 
Search instead for 
Did you mean: 

enum variable in XML and in GXML

There are two things I don't understand:

1) what is the <EW> tag doing there?

2) Why the GXML generated text is not self describing?


I need to store data in XML or GXML format wich includes the value of an enumerated selector ring.

If I use the flatten to XML function I get:


<Choice>Not Moving</Choice>
<Choice>CHB leads CHA</Choice>
<Choice>CHA leads CHB</Choice>
<Choice>bad reading</Choice>
<Choice>CHA only</Choice>
<Choice>CHB only</Choice>


Obviously the enum data type is not part of the regular XML data types.

Still, I like that all the possible selector values are listed, plus the selection is listed: <Val>1</Val>.

The only thing I don't understand what is the <EW> tag doing there? What does it mean?


if I use the I get this:


  <Desired_Channel_order type='Enum U16' sel='CHB leads CHA'>1</Desired_Channel_order>


In this case when I parse the GXML text I need to know what selection was made when the GXML text was created.

If I somehow don't know that the selection was 'CHB leads CHA' not 'CHA leads CHB' the parser sends an error.


 Anyone can suggest a workaround? I am not experienced with XML.

And thank you for your time and effort.

Scientia est potentia!
0 Kudos
Message 1 of 3

The <EW> and </EW> tags indicate the start and end of the enum type. Everything related to your enum will be contained between these two tags.


The gxml_generator VI is actually a customer submitted VI. You can find more information here:


If you have further questions regarding the gxml_generator VI, this VI is supported on this thread:


Hope this helps!


Emily C
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3



Thank you for your time and effort.

I am familiar with the information that is presented on the webpages you linked me to.


I found a solution to my problem.

I am replacing all enums in my code with text rings.


This seems much easier that writing VI's to handle the XML to enum conversion.

Scientia est potentia!
0 Kudos
Message 3 of 3