A method and system for encoding a mark-up language document is provided,
in which, the structure of the mark-up language document is condensed by
removing those parts of the structure that are fixed, and by expressing
the variable parts of the structure in terms of whether or how often they
occur. A template that specifies which parts of the structure are fixed
and which parts are variable may be provided to both the device that is
transmitting the mark-up language document and the device that is
receiving the mark-up language document.