A method (and system) for compressing an extensible markup language (XML) document, includes compressing an XML document such that information in a markup portion therein is maintained in a compressed form to allow the document to be reconstructed. During the compressing, the markup portion and a non-markup portion of the document are separated, and the non-markup component is compressed using a first compression method and the markup component is compressed using a second compression method.
A method of parsing a markup language document comprising syntactic elements is disclosed, said method comprising, for one of said syntactic elements, the steps of identifying (310) a type of the element, processing (318) the element by determining a hash representation thereof if said type is a first type, and augmenting (314) an at least partial structural representation of the document using the hash representation if said type is said first type.
A method is described for sending compact messages based on predefined message definitions. The message definitions comprise a number of predefined fields each having a tag for one or more data values. The method comprises the following steps. Communication is established between a service and a device. A compact message including data values is prepared by: removing the tags associated with the data values; maintaining an order of the data values based on a predetermined sequence of the fields defined by the message definitions; and placing the data values in respective delimiters for differentiating between adjacent ones of the data values. The compact message is sent over the network for subsequent interpretation using a shared predetermined knowledge of the order of the fields from the message definition. A method for receiving compact messages, a system for implementing the methods, and a computer readable medium for storing instructions to carry out the methods are also described.
A method for encoding a group of several structured fragments includes analyzing structure schemas of the fragments in order to obtain sequences of executable instructions for each component of the schemas. The instruction sequences are executed on the structured fragments so as to obtain an encoded binary stream containing the control codes and the information elements values of the fragments. The values of the information elements of the fragments in data blocks are distributed as a function of the respective types of the elements. The respective positions in the structure block are stored in a pointer table for each fragment and in the data blocks of the control codes and the information element values of the fragment. Compression algorithms are applied to the blocks adapted to the contents thereof, and the contents of the pointer table and data blocks are concatenated into an encoded binary container.
A technique for converting a compressed XML document to a format usable by an application is provided. The technique is capable of identifying an XML document even in a state that data thereof are compressed and capable of identifying a compression type thereof. When an XML document is originally compressed, an XML header is added to the compressed document, the XML header describing an encoding declaration which indicates that the compressed XML document is provided with encoding inclusive of compression. Thereafter, in an XML parser, a decoder, which converts the XML document into a coding system used by an application, decompresses the XML document based on description of the encoding declaration in the XML header.