Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Category:
Coding, syntax & commands
>Hi Mike,
>
>> having thought about it more though, the XML should be just as easy to generate and use.
>
>Once you wrote the code or if use the one from Rick, yes. If you need something non-generic, it's also not hard. A generic approach using XML is more difficult, though. You have to
>
>- Deal with various data types like datetime values before 1601, boolean, currency
>
>- Deal with properties that are NULL
>
>- Handle binary data properly, eg. CHR(0). This most likely requires hex or base 64 encoding which defeats the readability of XML
>
>- Store one and more-dimensional arrays
>
>- deal with the precision of numeric values. 1.0 is different from 1.00 for VFP as VFP keeps track of the number of decimal places
>
>- Deal with rounding issues. Numbers change when you convert them to strings, even with the highest precision. The following expression, for instance, returns .F.: (Val(Padr(1/3,21))) = (1/3). That's important if the object contains calculated values.
Thanks for the headsup. I'll be taking a non-generic approach here so hopefully I'll be able to avoid those issues.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only