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() function which linearizes an object into an XML
>> string, supporting all VFP classes including collections (not COM object),
>> and array properties. Here is a sample XML generated:
>>
>> <#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/camvtr9fqg38t+tcfkkvr9mygh0j+7hjbxbjmep9xwasn6rq...@mail.gmail.com
** 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.

Reply via email to