LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET XmlSerializer equivalent in LabView?

Hello,

 

I am using object oriented programming in labview 8.5 and would like to know if there is an equivalent set of methods that perform like the .Net XmlSerializer Class?

I would like to directly transform my objects into XML data for storage, and was wondering if there is a simple way of doing that in labview like there is in the .Net framework. 

 

If there aren't these methods in labview, maybe someone has written some code to do it (probably using the "Flatten to XML" and "Unflatten from XML" vi's)? 

 

Thanks,

Paul. 

0 Kudos
Message 1 of 5
(3,058 Views)

I guess a very simple solution is just to convert the object to a variant and then use the "Flatten to XML" vi. 

Any other suggestions? 

 

0 Kudos
Message 2 of 5
(3,049 Views)
Try using JKI's EasyXML toolkit.

___________________
Try to take over the world!
Message 3 of 5
(3,045 Views)

Hi,

 

Tried it, and it doesn't accept user-defined types, such as labview user-defined objects. 

In the end you have to convert the object to a variant (or some other labview data type, like a cluster) before wiring it to the EasyXml tool vi. 

So then it is up to your preference whether or not you like the xml the tool generates or you want to write something yourself.

 

thanks,

paul. 

 

0 Kudos
Message 4 of 5
(3,027 Views)
It accepts arbitrary clusters. It won't work with a class input because the data cluster of the class is private. No VI outside the class should know it.

___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(3,023 Views)