Reducing the impact of XML documents both in term of size and in term of processing speed has been the goal of many studies and research efforts, but never in a very formal or comprehensive manner. To strengthen the foundations of those works, we present here a comprehensive formal study of the quantity of information contained in XML documents. We then compare those theoretical results to the effective compactness obtained by some existing binary XML formats.