Lance Drake wrote:
Is there a suggested way/library/app/sample available anywhere that
allows/demonstrates/describes conversion of an XML 'database' to be
converted to a PDB file?
The strategy I have (so far) starts with a FileMaker database which
can be exported as XML. The XML text file is then sent to whatever was
the mechanism that would support the conversion to a PDB file. The plan
was then that the PDB would be HotSynced to the handheld and thus be
available to my app.
I do a lot of this type of stuff with Perl scripts. The p5-Palm
set of Perl modules contains a module called Palm::Raw that can
create a PDB file. There are also XML parser modules available
for Perl. When creating the PDB records, I tend to use pack() a
lot, since it gives me control over exactly what format the data
will go in (byte ordering, word size, null-terminated or even
null-padded strings if I want them, etc., etc.).
Of course you have to decide what structure you will impose upon
the PDB records, since it's just an ordered list of byte strings.
I wrote my own little set of utilities to put a set of named
tables into a PDB with text, integer, etc. data types. If you
just have one table, that might be overkill, but I needed to be
able to have multiple tables in one file. In my case, I found
that I mostly had small records, so it was beneficial for me to
pack multiple logical records into a single PDB record to avoid
making hotsyncs slow and wasting space. You may or may not need
to do that as well.
- Logan
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/