The topic of this work is to study the efficient evaluation of queries expressed in the XQuery language on XML databases distributed over peer-topeer networks. We present XQ2P, an extensible XQuery evaluation engine oriented towards exploiting Distributed Hash Tables and XML indexing techniques adapted to DHTs for efficient processing. In contrast to most related research, where a new indexing algorithm is introduced and a query language is developed depending on the constructs the index can evaluate efficiently, XQ2P was designed in a top-down fashion: it attempts to support, as much as possible, the entire XQuery language with a simple though unoptimized implementation, and then extend this by adding indexing and efficient query algorithms to optimize select operations. We believe this approach is more favorable to widespread adoption of XQuery, with desirable effects such as better interoperability and increased competition.