Hi Stef,
Am 18.06.2005 um 21:23 schrieb stéphane ducasse:
hi
serializing a simple object in XML is simple. Now I was wondering if there are good practices to serialize and reload composed objects.
For example: if I have an attribute containing a date, should I do the readFromString by hand as a postaction?
if I have an attribute containing a collection, should I
recreate the collection after loading?
I'm not shure what this example should show. Do you mean to have patterns for serializing object to XML in Squeak or in general ?
But one remark I would add: in the first step, the tree build from the XML stream should first reflect the XML structure, that means you can access a node having text node child, attribute node child and so on. The values are given as strings, but with type infos. From this the original object is created, by using this XML nodes and additional informations like culture info, which allows to interpret the strings in the value child nodes correct (date, time, currency, seperators etc).
So is your example above positioned in the first step (XML Node) or second (object creation) ?
Greetings
Hans