XML patterns
stéphane ducasse
ducasse at iam.unibe.ch
Sun Jun 19 10:16:06 UTC 2005
On 19 juin 05, at 11:11, Hans N Beck wrote:
> 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) ?
I have an object that I want to serialize in XML now this object
contains a date object
of course I can save it explicitly as a string and do a readFrom....
But I wanted to know if there is a more advance serialization process.
More information about the Squeak-dev
mailing list
|