klessm1 Posted December 7, 2011 Report Posted December 7, 2011 (edited) I am flattening an array of classes and loading into an MSSQL database in an XML column. When the XML is returned it is formatted to take up less space. Which means a line of "<Cluster></Cluster>" becomes "<Cluster/>". When returned in this manner I get an error: 1403 LabVIEW: Attempted to read flattened data of a LabVIEW class. The data is corrupt. LabVIEW could not interpret the data as any valid flattened LabVIEW class. Lines that have <Val/> and <Name/> work ok. It is only the custer tag that has the issue. I have attached two xml files...one with <Cluster/> (doesn't work) and the other with <Cluster></Cluster> (works) for reference. I am hoping someone at NI will take a look at this and enter a CAR if necessary because it just seems to be an overlooked item that doesn't happen much. This seems only possible with classes when a child class is empty. I don't think an empty cluster outside a class is possible. The work around is to perform a search and replace of <Cluster/> with <Cluster></Cluster>. Easy, but shouldn't be necessary. Using LabVIEW 2011. BeforeReplace.xml ClusterReplace.xml Edited December 7, 2011 by klessm1 Quote
Aristos Queue Posted December 8, 2011 Report Posted December 8, 2011 CAR 328228 filed. For future reference, posting something like this at http://forums.ni.com/ is more effective than posting it on LAVA -- the NI application engineers monitor those forums continuously and can directly file CARs and they know the known issues and workarounds better than anyone. Yes, sometimes posting here works, but no one from NI (myself included) assiduously reads every LAVA post, so bug reports like this can get easily missed. Quote
klessm1 Posted December 8, 2011 Author Report Posted December 8, 2011 I was going to post on the NI site, but they have one huge LabVIEW forum so I though it might get lost. Was not aware that every post was read there. Thanks for the information and for entering the CAR. Quote
Mellroth Posted December 8, 2011 Report Posted December 8, 2011 I was going to post on the NI site, but they have one huge LabVIEW forum so I though it might get lost. Was not aware that every post was read there. Thanks for the information and for entering the CAR. Personally I would expect the <Cluster></Cluster> construct to throw the same error since these elements are designed to have child nodes attached. <Name> and <Val> are child only, and are therefore OK to leave empty. Just my 2c /J Quote
crelf Posted December 8, 2011 Report Posted December 8, 2011 For future reference, posting something like this at http://forums.ni.com/ is more effective than posting it on LAVA. That may be so, but anyone's welcome to post about what they think are possible bugs here - so we can all discuss it, and maybe flesh it out more before it's reported. Quote
Aristos Queue Posted December 9, 2011 Report Posted December 9, 2011 That may be so, but anyone's welcome to post about what they think are possible bugs here - so we can all discuss it, and maybe flesh it out more before it's reported. This one seemed pretty specific and looking for a CAR number. Quote
Aristos Queue Posted January 10, 2012 Report Posted January 10, 2012 This CAR should be fixed in LV 2012. LV will be able to parse for "<Cluster/>". By the official documentation, "<Cluster />" is legal XML as well, but LV does not allow for spaces between the tag and the forward slash when parsing any other XML tags, so I did not include that in this fix. That would be a more systemic fix to all of LV's parsing. Quote
Aristos Queue Posted July 19, 2012 Report Posted July 19, 2012 It seems I messed something up... this bug is not resolved in 2012. I thought I had it fixed. And it was a double mistake: I even managed to mess up the test suite function that would have told me that it wasn't yet fixed. I am sorry. Quote
jcarmody Posted July 19, 2012 Report Posted July 19, 2012 [...] I even managed to mess up the test suite function that would have told me that it wasn't yet fixed. [...] My company sometimes takes this approach with design flaws that would be too expensive to fix. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.