An XML document can be viewed as a tree in a natural way. Processing tree data structures usually requires a pushdown automaton as a model of computation. Therefore, it is interesting that a finite automaton can be used to solve the XML index problem. In this paper, we attempt to support a significant fragment of XPath queries which may use any combination of child (i.e., /) and descendant-or-self (i.e., //) axis. A systematic approach to the construction of such XML index, which is a finite automaton called Tree Paths Automaton, is presented. Given an XML tree model T, the tree is first of all preprocessed by means of its linear fragments called string paths. Since only path queries are considered, the branching structure of the XML tree model can be omitted. For individual string paths, smaller Tree Paths Automata are built, and they are afterwards combined to form the index. The searching phase uses the index, reads an input query Q of size m, and computes the list of positions of all occurrences of Q in the tree T. The searching is performed in time O(m) and does not depend on the size of the XML document. Although the number of queries is clearly exponential in the number of nodes of the XML tree model, the size of the index seems to be, according to our experimental results, usually only about 2.5 times larger than the size of the original document.
[1]
Jeffrey F. Naughton,et al.
Covering indexes for branching path queries
,
2002,
SIGMOD '02.
[2]
Steven J. DeRose,et al.
Xml linking language (xlink), version 1. 0
,
2000,
WWW 2000.
[3]
Wojciech Rytter,et al.
Text Algorithms
,
1994
.
[4]
il Dan SuciuAT.
Index Structures for Path Expressions Extended Abstract
,
1997
.
[5]
Philip S. Yu,et al.
ViST: a dynamic index method for querying XML data by tree structures
,
2003,
SIGMOD '03.
[6]
Quanzhong Li,et al.
Indexing and Querying XML Data for Regular Path Expressions
,
2001,
VLDB.
[7]
Farshad Fotouhi,et al.
MTree: an XML XPath graph index
,
2006,
SAC.
[8]
Bongki Moon,et al.
PRIX: indexing and querying XML using prufer sequences
,
2004,
Proceedings. 20th International Conference on Data Engineering.