crelf Posted April 14, 2012 Report Share Posted April 14, 2012 Firstly, and I know I've said this before, but EasyXML is a great product that really fills a niche in the LabVIEW world. My customer wants a new version of a long-running application, and using EasyXML has saved me man-days of design, development and test time - so a big thanks to JKI! On to my quesiton: XML inherently doesn't support ordering of elements (that's why we can attached attributes to elements, so we can distinguish between them), but I was wondering if EasyXML does. From my limited testing, it looks like EasyXML will populate an array of elements in the order they appear in the XML file on disk - is this always the case? Here's a simple illustraive example - imagine this is deep inside an XML file: <GroupOfThings> <Thing ID="1"> <Size>Small</Size> <Colour>Red</Colour> </Thing> <Thing ID="2"> <Size>Medium</Size> <Colour>Green</Colour> </Thing> <Thing ID="3"> <Size>Large</Size> <Colour>Blue</Colour> </Thing> </GroupOfThings> Will the array in my XML cluster always have these elements in the order they appeared in the file? I know that it's not technically right to rely on this, but I'm hoping the answer is "yes" Link to comment Share on other sites More sharing options...
Jim Kring Posted April 16, 2012 Report Share Posted April 16, 2012 Hey crelf, Yes, I believe that the current implementation of EasyXML does always preserve ordering when converting between LabVIEW and XML data. I don't see any reason why this would ever change, but we can't guarantee it, since (as you've mentioned) the XML specification does not support ordering of elements. -Jim Link to comment Share on other sites More sharing options...
crelf Posted April 17, 2012 Author Report Share Posted April 17, 2012 Yes, I believe that the current implementation of EasyXML does always preserve ordering when converting between LabVIEW and XML data. I don't see any reason why this would ever change, but we can't guarantee it, since (as you've mentioned) the XML specification does not support ordering of elements. Thanks Jim - that's exactly the answer I was expected, and hoping for. Link to comment Share on other sites More sharing options...
Jim Kring Posted April 17, 2012 Report Share Posted April 17, 2012 Thanks Jim - that's exactly the answer I was expected, and hoping for. You're very welcome, and I'm pleased to hear that EasyXML has saved you time and effort on your project work. Thanks for sharing that feedback Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.