Marshaling Smalltalk objects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Marshaling Smalltalk objects

Rob Vens-2
I am trying to map Smalltalk objects to XML and vice-versa.
In 7.4 there was for example in class Dictionary protocol for doing that:

Dictionary>>asXmlNode: aString
        ^Net.Settings dictionary: self  asXmlNode: aString

This is gone from 7.4.1 and I wonder how I can now convert my
Dictionary to an XML tree as simple as possible, and later from XML to
Smalltalk. I would appreciate it if those of you who have done this
before can give me examples.

Reply | Threaded
Open this post in threaded view
|

RE: Marshaling Smalltalk objects

Kogan, Tamara
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob
Vens
> Sent: Sunday, July 02, 2006 12:34 PM
> To: VWNC,
> Subject: Marshaling Smalltalk objects
>
> I am trying to map Smalltalk objects to XML and vice-versa.
> In 7.4 there was for example in class Dictionary protocol for doing
that:
>
> Dictionary>>asXmlNode: aString
> ^Net.Settings dictionary: self  asXmlNode: aString
>
> This is gone from 7.4.1 and I wonder how I can now convert my
> Dictionary to an XML tree as simple as possible, and later from XML to
> Smalltalk. I would appreciate it if those of you who have done this
> before can give me examples.

For XML to object mapping you should look at "XML to Smalltalk mapping"
chapter in the WebServices.pdf. The Dictionary>>asXmlNode method was
created to store the Net Settings only.
I attached a sample that shows how to map XML to Dictionary. More
samples can be found in the public repository in the XMLToObjectTests
package.

HTH,
Tamara

XMLToDict.zip (916 bytes) Download Attachment