Teaching relational optimizers about XML processing. Sihem Amer-Yahia, Yannis Kotidis and Divesh Srivastava. Due to their numerous benefits, relational systems play a major role in storing XML documents. XML also benefits relational systems by providing a means to publish legacy relational data. Consequently, a large volume of XML data is stored in and produced from relations. However, relational systems are not well-tuned to produce XML data efficiently. This is mainly due to the flat nature of relational data as opposed to the tree structure of XML documents. In this paper, we argue that relational query optimizers need to incorporate new optimization techniques that are better suited for XML. In particular, we explore new optimization techniques that enable computation sharing between queries that construct sibling elements in the XML tree. Such queries often have large common join expressions that can be shared through appropriate rewritings. We show experimentally that these rewritings are fundamental when building XML documents from relations.