I am currently developing a new Smalltalk Wiki implementation
) and I am planning to use
SIXX to store my large tree-structures to xml. It seems to me the
perfect solution, because it can handle circular references and it
My first attempt was to dump everything out into a XML file using the
following code from your tutorial:
sws := SixxWriteStream newFileNamed: 'root.xml'.
sws nextPut: wikiRootNode.
The XML file looks fine, but unfortunately the XML parser is not able
to read that file again. The problem seems to be the huge binary data
(images, pdf) that is stored within ByteArray's.
I think storing binary-data to XML is not a good idea anyway, so I want
them to be put in special external files. The only thing to change - at
least I think so - is my Resource class, that contains this binary
data. So it should only dump the filename of the binary data and not
the data itself. To archive this goal, I wrote something similar to:
Resource>>sixxContentOn: aStream indent: level context: dictionary
| filename |
filename := self generateUniqueFilename.
self dumpToBinaryFile: filename.
super sixxContentOn: aStream ident: level context: dictionary
But how do I prevent SIXX from saving the binary data again, without
hardcoding the other i-vars? How do I archive the loading of the binary
Could you give me some hints?
Thanks a lot for your help