Jump to content
Chris_Collier

XML Data file versioning

Recommended Posts

I'm building an application (which I am intending to share at a local user group soon), but am having issues with XML file data versioning.

 

My intent is to have a data type which has a version string, and a variant for the data which will be read according to the version number in the version string.  The issue is that if you flatten the data type to an XML string with any data in the variant, then try to unflatten the data, you get an error (1106: "LabVIEW:  The XML tag describing the type of data does not match the wired type.")

 

How have you done versioning for data files which you are pretty sure will change over time?

 

And can anyone tell me why this attempt doesn't work?

 

Thanks,

 

-Chris Collier

 

P.S. The attached files are in LV 2014

Test XML.zip

Edited by Chris_Collier

Share this post


Link to post
Share on other sites

And can anyone tell me why this attempt doesn't work?

 

Apparently, xml for an empty variant is different than that for a variant with some typed data content; you can circumvent that flattening the variant:

post-28229-0-76595500-1440088947.png

Share this post


Link to post
Share on other sites

Thank you.  Implementing this does make the software work as I would expect.  This is more steps than I thought would or should be needed, but it should allow me to use versioning implemented as I wanted.

 

Thank you for your help!

Share this post


Link to post
Share on other sites

Since this is for a presentation at a User Group meeting, I wanted to keep as much of the code to standard LabVIEW install as possible (for those who inherently dislike plugin tools for whatever reason).  This should make it so that anyone with the correct version of LabVIEW will be able to review the code off-the-shelf.

That being said, I think I'll look into the JSON package for my own work.  Thanks for the link!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.