If this question addresses to me, the goal of cXMLofObject() is to linearize any object and later rebuild it exactly the same using objectOfXML().
We don't care about differences but do recurse on member objects and take care of collections. The approach you suggest is perfectly fine for a 'simple' object, which is 99% of the cases. As cXMLofObject() is part of FoxInCloud, it much address up to 99.999% of the cases, even if these additional .999% are awfully expensive! Thierry Nivelet http://foxincloud.com/ Give your VFP app a second life in the cloud > Le 19 sept. 2015 à 11:13, Laurie Alvey <[email protected]> a écrit : > > Have you considered using COMPOBJ(o1,o2) which if it returns .F., you can > then use AMEMBERS() to find the differences? > > Laurie > > On 18 September 2015 at 17:11, Thierry Nivelet <[email protected]> > wrote: > >> a structured XML will probably make it clearer (#c#: class, #cl#: class >> library): >> >> >> <#o#> >> <#c#>Collection</#c#> >> <#cl#></#cl#> >> <#p#> >> <#n#>object</#n#> >> <#t#>O</#t#> >> <#v#> >> <#o#> >> <#c#>Collection</#c#> >> <#cl#></#cl#> >> <#p#> >> <#n#>object</#n#> >> <#t#>O</#t#> >> <#v#> >> <#o#> >> <#c#>Custom</#c#> >> <#cl#></#cl#> >> <#p#> >> <#n#>object</#n#> >> <#t#>O</#t#> >> <#v#></#v#> >> </#p#> >> <#p#> >> <#n#>string</#n#> >> <#t#>C</#t#> >> <#v#>testValue</#v#> >> </#p#> >> </#o#> >> </#v#> >> </#p#> >> <#p#> >> <#n#>string</#n#> >> <#t#>C</#t#> >> <#v#>testValue</#v#> >> </#p#> >> <#item#> >> <#key#>testItem1</#key#> >> <#type#>C</#type#> >> <#value#>testItem1</#value#> >> </#item#> >> <#item#> >> <#key#>testItem2</#key#> >> <#type#>C</#type#> >> <#value#>testItem2</#value#> >> </#item#> >> </#o#> >> </#v#> >> </#p#> >> <#p#> >> <#n#>string</#n#> >> <#t#>C</#t#> >> <#v#>testValue</#v#> >> </#p#> >> <#item#> >> <#key#>testItem1</#key#> >> <#type#>C</#type#> >> <#value#>testItem1</#value#> >> </#item#> >> <#item#> >> <#key#>testItem2</#key#> >> <#type#>C</#type#> >> <#value#>testItem2</#value#> >> </#item#> >> </#o#> >> >> Thierry Nivelet >> FoxInCloud >> Give your VFP app a second life in the cloud >> http://foxincloud.com/ >> >> Le 18/09/2015 17:39, Thierry Nivelet a écrit : >> >>> Hi Kent, >>> >>> we have a cXMLofObject >>> <#o#><#c#>Collection</#c#><#cl#></#cl#><#p#><#n#>object</#n#><#t#>O</#t#><#v#><#o#><#c#>Collection</#c#><#cl#></#cl#><#p#><#n#>object</#n#><#t#>O</#t#><#v#><#o#><#c#>Custom</#c#><#cl#></#cl#><#p#><#n#>object</#n#><#t#>O</#t#><#v#></#v#></#p#><#p#><#n#>string</#n#><#t#>C</#t#><#v#>testValue</#v#></#p#></#o#></#v#></#p#><#p#><#n#>string</#n#><#t#>C</#t#><#v#>testValue</#v#></#p#><#item#><#key#>testItem1</#key#><#type#>C</#type#><#value#>testItem1</#value#></#item#><#item#><#key#>testItem2</#key#><#type#>C</#type#><#value#>testItem2</#value#></#item#></#o#></#v#></#p#><#p#><#n#>string</#n#><#t#>C</#t#><#v#>testValue</#v#></#p#><#item#><#key#>testItem1</#key#><#type#>C</#type#><#value#>testItem1</#value#></#item#><#item#><#key#>testItem2</#key#><#type#>C</#type#><#value#>testItem2</#value#></#item#></#o#> >>> >>> >>> If you find a way to diff 2 such XML, it should suit you. >>> >>> Thierry Nivelet >>> FoxInCloud >>> Give your VFP app a second life in the cloud >>> http://foxincloud.com/ >>> >>> Le 18/09/2015 16:16, Kent Belan a écrit : >>> >>>> Happy Friday !!! >>>> >>>> I need to write a function that will compare 2 objects and return a >>>> string >>>> listing the differences. >>>> >>>> Before I start, I was hoping someone already has this function and would >>>> share the code ?? >>>> >>>> Thanks, >>>> Kent >>>> >>>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

