: Relational database systems are highly efficient hosts to table-shaped data. It is all the more interesting to see how a careful inspection of both, the XML tree structure as well as the W3C XQuery language definition, can turn relational databases into fast and scalable XML processors. This work shows how the deliberate choice of a relational tree encoding makes the XML data model--ordered, unranked trees--accessible to relational database systems. Efficient XPath-based access to these data is enabled in terms of staircase join, a join operator that injects full tree awareness into the relational database kernel. A looplifting compiler translates XQuery expressions into purely algebraic query plans. The representation of iteration (i.e., the XQuery FLWOR construct) in terms of set-oriented algebra primitives forms the core of this compiler. Together, the techniques we describe lead to unprecedented XQuery evaluation scalability in the multi-gigabyte XML range. Pathfinder is an open-...