G#

cancel
Showing results for 
Search instead for 
Did you mean: 

Deserialization as xml

Hi there;

I think there is bug in deserilization of G# class using xml. It happened when I put the attribute a cluster inside the cluster (MyTestClass2.lvclass attribute). I suspect that the function G#Object_ParseClusterXML.vi does not parse the xml correctly. I attached the code which produce the bug. Please run the G# - SerializationExample2.vi which used the MyTestClass2 class to serialize and deserialize to xml file.

Thanks.

DAKBIAS
0 Kudos
Message 1 of 7
(7,452 Views)

Please set the "as xml" button to TRUE before run, otherwise, it will save and load as binary file and return the correct value. One more thing is, try to fill all the input value in G# - SerializationExample2.vi file before run. If using xml, the value of "Account out" attribute will return null which is not correct (bug).

DAKBIAS
0 Kudos
Message 2 of 7
(4,880 Views)

Hi,

Yes, you are right, there is a bug in XML serialization if you put two clusters next to each other. I will have a look at it and come back with a fix. I do agree that it is probably the G#Object_ParseClusterXML.vi that has the annoying bug.

Thanks for reporting this,

Mattias

0 Kudos
Message 3 of 7
(4,880 Views)

Hi,

I just made a fix in the latest release. I actually removed the support for matching attributes. It was the thing causing the bug and it was a bit too complex to find a simple solution. This is more safe. Please download latest release 1.4.5 from: http://www.addq.se/gsharp.

Thanks,

Mattias

0 Kudos
Message 4 of 7
(4,880 Views)

Thanks fot he fix. It works now Thank you very much

DAKBIAS
0 Kudos
Message 5 of 7
(4,880 Views)

Hi

I guess 1.4.5 refers to the framework ?

My Version information says

G# Framework 1.4.4

G# Version 1.5.0

Gabi

Please see also my other question about de-serialisation.

7.1 -- 2013
CLA
0 Kudos
Message 6 of 7
(4,880 Views)

Hi, yes 1.4.5 is the entire framework, This is the "offical" version. G# 1.5.0 is the root G# class version that all classes inherits from.

0 Kudos
Message 7 of 7
(4,880 Views)