Querying Biblical Texts: Part 1 by Jonathan Robie.
From the post:
This is the first in a series on querying Greek texts with XQuery. We will also look at the differences among various representations of the same text, starting with the base text, morphology, and three different treebank formats. As we will see, the representation of a text indicates what the producer of the text was most interested in, and it determines the structure and power of queries done on that particular representation. The principles discussed here also apply to other languages.
This is written as a tutorial, and it can be read in two ways. The first time through, you may want to simply read the text. If you want to really learn how to do this yourself, you should download an XQuery processor and some data (in your favorite biblical language) and try these queries and variations on them.
…
Humanists need to follow this series and pass it along to others.
Texts of interest to you will vary but the steps Jonathan covers are applicable to all texts (well, depending upon your encoding).
In exchange for learning a little XQuery, you can gain a good degree of mastery over XML encoded texts.
Enjoy!