Traditional index structures for XML data can be divided into two categories: the structure summary and nodes location approach. There exist some problems for both kinds of index structure. The structure summary for XML data often has large size, and performs poorly when processing complicate queries. The primary problem for nodes location approach is that it often causes too many joins in the evaluation of long queries. To solve these problems, a dynamic index structure for XML data, DifX is proposed. By utilizing the notion of dynamic bisimilarity, DifX can efficiently support diverse queries. Experimental results show that DifX is an effective and efficient index structure for XML data, and performs much better than traditional index structures.