On Wednesday 23 August 2006 22:35, Peter C. Verhage wrote: > A. S. Bradbury wrote: > > They're very limited at the moment, there's nothing more to them than > > listing parameters between /, and * are supported much like directory > > globbing. There's no way to specify certain parameters (like to select > > only verses lists with more than 5 children). But then Ruby has powerful > > array operations like #select and #reject for this sort of querying. I > > made this interface as basic as possible, not being sure what people > > would need/use. What sort of queries would you like to perform? I was > > planning on adding range selection, so you could do e.search > > 'book/chapter/verses/[0..5/whatever'. Clearly in your structure it would > > be as easy to just slice the result array. > > If I look at the queries that can be performed now they look somewhat > similar to XPath expressions. The structure you define also looks a lot > like an XML structure, so maybe the data extracted can be easily > converted to XML? This would allow you to use REXML's powerful XPath > support to query the results. Next to this the results can easily be > exported as XML too. I hadn't got round to XML export yet, but this seems like an excellent reason to bump it up higher on the todo list. I wanted to avoid reimplementing XPath, which is why I chose a very simple query interface that is quite similar to globbing directories (no ** at the moment). XML export of course means I don't have to reimplement this myself, excellent. I'll add #to_xml to the extracted data structures. Alex