XPath 1 [4] is a practical language for selecting nodes from XML document trees and plays an essential role in other XML-related
technologies such as XSLT and XQuery. Implementations of XPath need to scale well both with respect to the size of the XML data and the growing size and intricacy of the queries (i.e., combined complexity). Unfortunately, current XPath engines use query evaluation
... [Show full abstract] techniques that require time exponential in the size of queries in the worst case [1].
The main aim of this tutorial is to show that and how XPath can be processed much more efficiently. We present an algorithm for this problem with polynomial-time combined query
evaluation complexity. Then we discuss various improvements over the basic evaluation algorithm, such as the context-restriction
technique of [3], which lead to better worst-case bounds. We provide an overview over XPath fragments that can be processed
yet more efficiently, most prominently one that can be evaluated in linear time (cf. [1,3]). Next we discuss the parallel
complexity of XPath. While full XPath is P-complete w.r.t. combined complexity, various (minor) restrictions are known which
reduce the complexity to highly parallelizable complexity classes [2]. Finally, we give an overview of further recent work
on efficient XPath processing, in particular using logic- and automata-based techniques.