• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. SyncML API and Reference Imp... > Generating a SyncML Document

Generating a SyncML Document

To generate a SyncML document, an application first needs to initialize a new instance of the workspace using the smlInitInstance command. During initialization, a workspace buffer is assigned. The toolkit uses this workspace buffer to store the generated documents until they are sent or to store incoming documents until they are completely parsed. The application developer could choose to use one workspace for all documents, a different workspace for each document, or one workspace for generating documents and one for parsing documents. The type of encoding that the toolkit should use (XML or WBXML) can be set at the time the instance is initialized with smlInitInstance or at a later point in time with smlSetEncoding. It is also possible to define a fixed memory size for the workspace buffer. The process is outlined in Figure 10-5.

Figure 10-5. Example API sequence for creating and sending a SyncML document



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint