10-07-2008 03:30 AM
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.
10-07-2008 04:28 AM
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?
10-07-2008 04:33 AM
10-07-2008 06:52 AM
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.
10-07-2008 07:23 AM