Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serializing / unserializing recursive objects
Message
 
À
25/07/2005 11:58:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01035740
Message ID:
01037370
Vues:
30
wwXML Supports deserializing hierarchical objects *IF* you provide an object 'template' as input. wwXML generates hierarchical output, but it doesn't create a schema from the output (for various reasons of complexity), so the compromise is that you have to use an object as an input template.

It works well actually for many scenarios such as marshalling business objects that exist on both ends of a connection. Even in situations when that's not the case you can always create the objects needed dynamically and then inload the XML into them.

There's an article that describes this process in some detail here:

http://www.west-wind.com/presentations/XMLMessaging/xmlmessaging.htm

The wwXML documentation also describes the issues and best ways to deal with them in the help file.

+++ Rick ---


>Hello,
>
>I am looking for a way to serialize recursive/compound objects, that is, objects whose properties are objects themselves and so on (but with no circular reference).
>I did a research here, and in almost all threads about this it was recommended to use Rick Strahl's wwXML class, with the methods ObjectToXML and XMLToObject - which I did. But while ObjectToXML can serialize recursive objects (with the property lRecurseObjects set to .T.), I have found no way of recreating the object using the XMLToObject method. Indeed, the documentation of the nCreateDataStructure property seems to suggest that only flat objects can be unserialized.
>Did I miss something ? Or is there another way to serialize objects which takes recursive objects into account ?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform