"David A. Desrosiers" <[EMAIL PROTECTED]> skrev i melding
news:55758@palm-dev-forum...
> For me, I am using XML in a test capacity to hold and "represent" my
> Palm data on my desktop. I am beginning to mature the pilot-link toolchain
> to handle the input and output of this format natively. Why do I want to
do
> this? Because now with a common way to "describe" the data and records on
> the Palm (all the fields in each database on the '4 Magic Buttons'), all
of
> the tools which need access to that data don't need to deal with
convoluted
> pack()/unpack() routines to gain access to it

This seems like a very good idea. Do you have details on this?

XML is normally thought of  as a textual data format, described by a DTD,
and accessed by an XML parser. However, most parsers provide the XML data
through parser event callbacks, e.g. startTag(tag, attributes), endTag(tag),
etc., which the client program then codes to handle the different tags and
attributes. So XML can also be thought of as a practical way for a
programmer to access any data, provided there is a "parser" that provides
this data to the client program using the same parser events. E.g. a mime
email message could be parsed by a special parser and served to an
application as XML data.

In the context of the palm applications, it would be interesting to have a
palm library that could provide the content of the four main databases using
parser callbacks for your XML formats. This could be done without actually
generating a corresponding XML text file. For a programmer without palm
coding experience, this might be an easier way to access the palm data than
understanding the DM API and native palm db formats. The performance remains
to be seen...

> If you're speaking about using an actual XML parser ON the Palm, I
> agree. That's not where the parser should go. The parser should go where
the
> data is manipulated, not where the data is displayed.

This depends on how the parser is used. If there is a steady stream of XML
data, a callback-style parser needn't add much memory at all, so the memory
used is that needed for buffering the data stream and one tag or text
element. I have implemented such a parser
(http://www.idi.ntnu.no/~hal/development/palm/xmllib.html) as a shared
library. The client program handles the buffering for the library and can
tune it to its own needs. The parser in turn calls the handler routines for
each element and the client program may reuse the buffer. I haven't done any
performance measurements, so what applications it's suitable for remains to
be seen. At least it's not memory hungry.

As mentioned it would be interesting to serve the content of the four main
databases using the same handler structure, making it look like XML.

Hallvard




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to