waldemar.hersacher, on Nov 25 2009, 01:43 PM, said:
This is an old thread resulting in an pending known issue. In my opinion there is no error related to Easy XML.
In the original post a XML string is created from a cluster of version 1.0. This string is parsed into a cluster of version 1.0 and then is tried to convert to a cluster of version 1.1 with "Variant to Data". The variant input does not match the type to convert to. See Missing-elements-incorrect.png
The right and correct functional way is to parse with a cluster of version 1.1 and then convert it to LV data. In this case the variant input and the type is matching for "Variant to Data". See Missing-elements-correct.png
Hi Waldemar,
Thanks for posting your great insights on this issue.
I agree with you that it's a good idea to keep a snapshot of every version of your data structure that you need to support, and then define a conversion process migrating versions. In fact, I wrote a blog article called "
Supporting Multiple Versions of a File Format" that discusses some similar concepts.
Regarding the known issue, it's certainly arguable about whether this should be a "bug" or a "feature". Still, it would be nice if EasyXML made it easier to handle missing elements in the XML. Of course, it would be useful to know when this happens and which elements were missing. For example, we could add a Boolean argument called "Allow Missing XML Elements? (False)" that allows the more flexible behavior. We could also output some data that tells which elements were missing (for users who care to know). We're not totally decided about how to handle this, but we're certainly thinking about it. After all, making EasyXML more flexible, makes the programmer's job easier -- and, "easy" is what EasyXML is all about
Thanks,