Analyzing the problem
what kind of data
tree data (XML)
graph data
what kind of queries
restricted regular expressions (e.g. XPath)
arbitrary regular expressions