Jump to content

Unflatten from XML


LAVA 1.0 Content

Recommended Posts

Hmmm... I haven't looked in detail at the issue you are facing, but I did encounter some issues with using LabVIEW classes with the Flatten to XML and Unflatten from XML functions. The CAR for this is CAR# 124834. NI traced that problem, though, to the use of Enums in the class data, not just to having a class within a class (which did work in some simple tests I did). It seems you are encountering a different problem, though.

By the way, I think this is the ability to translate LabVIEW class data to XML is a potentially an extremely powerful tool! For instance, we are interested in this as a way to share data with a Java application, and as a way to send data to implement the OOP command pattern (there are other ways to do this, of course).

Paul

Link to comment

It seems that Flatten/Unflatten to String works fine with your example. Download File:post-3266-1221768337.vi

I'm not sure if you actually needed to flatten to the LabVIEW XML format, but this is a possible workaround if all you needed to do is flatten the class data pass it to another process.

Thanks for this example! I was just working on a project that will benefit from flattened class data.

Link to comment
  • 3 months later...

QUOTE (Paul_at_Lowell @ Sep 18 2008, 10:42 AM)

Hmmm... I haven't looked in detail at the issue you are facing, but I did encounter some issues with using LabVIEW classes with the Flatten to XML and Unflatten from XML functions. The CAR for this is CAR# 124834. NI traced that problem, though, to the use of Enums in the class data, not just to having a class within a class (which did work in some simple tests I did). It seems you are encountering a different problem, though.

By the way, I think this is the ability to translate LabVIEW class data to XML is a potentially an extremely powerful tool! For instance, we are interested in this as a way to share data with a Java application, and as a way to send data to implement the OOP command pattern (there are other ways to do this, of course).

Paul

Paul - do you recall if this produces error 1527 - "LabVIEW: Attempted to read flattened data of a LabVIEW class that is not currently loaded into LabVIEW."? I'm getting this error trying to convert out of an XML string that was just saved to disk. I certainly have the class loaded in memory - there's an object sitting right next to the unflatten from XML (in fact its wired into that function). I don't think this XML is quite ready for use...

Mike

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.