You could try sqlite... it's built into RB isn't it?
The main thing is to make your format extensible. Thats what XML is
about...
Most naive binary formats end up "painting themselves into a corner",
not allowing themselves to add extra information at a later stage.
Instead of having a hierarchical and extensible format like XML.
There are binary XML libraries around that could be turned into a
plugin, although I'll bet it's much easier to write your own binary
XML in REALbasic, or just use sqlite :)
On 28 Apr 2009, at 20:00, realbasic-nug-request@lists.realsoftware.com
wrote:
Subject:
To: REALbasic Network Users Group Users Group
<realbasic-nug@lists.realsoftware.com>
Message-ID: <6E706737-CC19-49C6-A92D-7F124CAF6F29@rbclass.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Hi All,
Before I go ahead and code some binary version of my XML-based
document file I'd just like to ask if there's a right and wrong way to
save and read a binary file for this purpose having never really used
binary files before.
Background:
Basically my app currently reads and writes all of its data in xml
format. It is for the main purely text but also contains images which
are stored in the xml as file references by EncodeBase64. (I initially
stored the pictures to the xml file with Norman's pictureToString
routine but a saved file would grow so large that it wasn't
practical.)
But now I need to add more images to the file and (more importantly)
make the file portable, in which case file references just won't do
and so I'm f going down the binary file route.
So my question is - what's the best approach to storing different
kinds of text and images in one binary file for use as a document file
by my app? Any pitfalls/ schoolboy errors to watch out for?
Thanks for your help.
All the best,
--
http://elfdata.com/plugin/
"String processing, done right"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|