SIXX is an XML serializer/deserializer written in Smalltalk
(currently Squeak 3.2, VisualWorks 5i.4 - 7, Dolphin XP and Smalltalk/X are supported).
The purpose is to store and load Smalltalk objects in a portable, dialect-independent XML format,
providing a functionality simular to
(sigh - yet another format).
Currently, the implementation is provided for Squeak 3.4, VisualWorks 5i.4-7, Dolphin XP and Smalltalk/X. (Sorry for other dialect fans, please see the future plan.)
Two XML parsers (YAXO and VWXML) are supported.
Sixx runs on the default VW XML parser (VWXML).
Sixx runs on YAXO for Dolphin, ported by Steve Waring.
Like with Squeak: Sixx can use YAXO or the VW XML Parser.
Extract the zip file to your Squeak root directory and just file in 'install.st'.
Extract the zip file to any parcel directory and parcel in 'SIXX-Install'.
Extract the zip file to your Dolphin root directory and install a package named 'SIXX Install.pac'.
Sixx is already installed as a bunch of autoloaded classes.
SIXX is very easy to use. Like #storeString, You can generate a SIXX string by #sixxString.
array := Array with: 1 with: 'Hello' with: Date today. array sixxString.
This code generates a SIXX string below:
'<sixx.object sixx.id="0" sixx.type="Array" > <sixx.object sixx.id="1" sixx.type="SmallInteger" >1</sixx.object> <sixx.object sixx.id="2" sixx.type="String" >Hello</sixx.object> <sixx.object sixx.id="3" sixx.type="Date" >16 June 2002</sixx.object> </sixx.object> '
This string can be read by #readSixxFrom:.
Object readSixxFrom: sixxString. "sixxString is the above string"
SixxWriteStream and SixxReadStream are provided so that you can write/read Smalltalk objects like a binary-object-stream way. (Yes, the BOSS in VW, and the ReferenceStream in Squeak).
In order to write objects to an external file, you can:
sws := SixxWriteStream newFileNamed: 'obj.sixx'. sws nextPut: <object>. sws nextPutAll: <collection of object>. sws close.
And to read objects from an external file:
srs := SixxReadStream readOnlyFileNamed: 'obj.sixx'. objects := srs contents. srs close.
There are XML object serializer/deserializers already available. (Generally speaking, SIXX is much simpler, because it has been specialized for Smalltalk.)
For ODMG objects:
For Java objects:
SIXX is designed for serializing/deserializing object instances "data"(states). If you would like to save/load Smalltalk class definitions, use SMIX, instead.