1. Method of coding or decoding a structured document of items, comprising a step of configuring an encoder or decoder including the obtaining of data describing a document structure model and the storage of said data in the form of recordings intended to be used by the encoder or decoder for coding or decoding items of a structured document, wherein a recording associated with an item comprises the minimum and maximum numbers of occurrences of said item defined by the structure model, the method further comprising the following steps: the calculation of a number of items referred to as possible items, able to succeed, according to the structure model, an item of said model, the storage of said number of possible items in a recording associated with said item.