Am Donnerstag, 20.02.03 um 14:36 Uhr schrieb Lukas Renggli:
Hi Masashi,
I am currently developing a new Smalltalk Wiki implementation
(
http://scgwiki.iam.unibe.ch:8080/SCG/520) 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
dialect independent.
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.
sws close.
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.
Hi Lukas and Masashi,
I really like to be able to store binary data in the xml-file very much
(I wasn't aware of that functionality of SmaCC),
so at least please keep it for me (and certainly fix it if necessary and
possible :-), as I want to make heavy use out of it in the near future.
Thanks,
Markus
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 data?
Could you give me some hints?
Thanks a lot for your help
Lukas
--
Lukas Renggli
http://renggli.freezope.org