Design a message format

Where there is communication,there is message exchange.
In a SMS(short message system),there are binary stream based protocols,such as SMPP,SGIP,CNGP,SMGP,etc.
Using binary messages results in efficient exchanges because the message payloads are compact.However,because they are also intended to save space,binary messages sacrifice self-descriptiveness.Consequentyly,both client and server must know the format of binary messages in advance,which means that client and server are tightly coupled.
Extensible Markup Language(XML) messages are at the complex end of the range of messge formats.The MIDP specification does not require XML support.However,developers are free to add XML support to a MIDP application by incorporating additional libraries.
For XML parsing and general processing,developer can choose DOM(Document Object Model) and the SAX(Simple API for XML).
Developer should take care when adding XML support to an application.In addition to the costs in size and bandwidth,there are non-trivial costs in memory,processing, and storage.Developers are advised to measure these costs when deciding to support XML.

你可能感兴趣的:(xml,Exchange)