Palm OS Web Application Developer's Guide: Developing and Delivering PQAs with Web Clipping

After you have decided what needs to be sent across the connection, you have to decide how to do it you need a data and transport format that will be easy for the client to recognize and that will save you valuable bandwidth. Although a decision to choose one option will also influence the other, for the sake of discussion, let s split the issue.
What should your server-side application generate? HTML? XML? Proprietary format? It mainly depends on what you are willing to do on the client. HTML is not an appropriate format unless you are writing a browser.
Most applications would use either this or XML format (explained in the following section). The format is flexible; you send exactly what your client expects. Your data can be 8-bit values. Our example, the Unwired Widgets Mail Reader, uses a proprietary format for its over-the-air protocol.
If you ever had to write a simple C structure to a file, you could simply copy the bytes from memory directly to the file. The version of the structure in the file is a direct image of the memory used by the structure. This fails when storing a linked list of such structures in memory, because a linked list will be spread out everywhere in the memory, and you would not be able to find an easy way to dump it to a file. Just directly dumping each structure would not work because the pointers embedded in the...