XML has been widely adopted for interoperable applications. This often requires the construction of large XML repositories resulting in poor query response times. Although the poor performance of XPath queries has attracted a great ded of attention from the research community in the form of specialised indexes, there are still issues concerned with build times for indexes and the lack of support for the full set of XPath axes. This thesis adopts a metadata approach to the problem with two levels of abstraction: schema metdata and index/statistical metadata. The purpose of storing metadata is to optimise the query processing effort at the level of the XPath axes. Each axis has a separate processing logic and they exploit a common set of metadata constructs in different ways. Together with an overall strategy for the management of XPath queries, we demonstrate levels of improvement over the widely used eXist database.