LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in Flatten To XML

Hi,


NI forgot to escape the data when you flatten a picture to XML!


If the picture happens to have e.g. "</" in it's data, the unflatten to XML gives an error.


Very minor bug, but still..


Regards,


Wiebe.




NB. Wouldn't it be better XML if they used a CDATA structure for strings and binary data?
0 Kudos
Message 1 of 4
(2,992 Views)
Wiebe,

Could you attach a sample set of files (image and VI) that shows the error?  It would be very helpful when trying to figure out if this is expected behavior or not.  I did want to point out the Escape XML function that will go through and replace special characters for you.  Would this take care of this? 

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
Message 2 of 4
(2,968 Views)

Andy,

 

1) Stangely enough, the Escape XML.vi doesn't escape "</"!

2) Escape XML.vi takes a string, so you have to convert the picture to string. But when you convert the picture to string, the bug isn't there anymore.

 

So to work around the problem, you can just convert the picture to string (use flatten to string, casting is (without any reason) disabled...).

 

Someone who wants to flatten pictures to XML should be experienced enough to figure this out, so I wouldn't put the bug on the priority list. Also, fixing it could cause backwards compatibility problems.

 

Regards,
 
Wiebe.
Message 3 of 4
(2,948 Views)
Wiebe,

Thanks for finding and reporting this.  Your feedback certainly helps make LabVIEW a better product.  Thanks again!

Andy F.
-----------------------------------------------------------------
National Instruments
Message 4 of 4
(2,925 Views)