Querying XML with eXist
Recently I needed to be able to be able to query a bunch of XML files using XQuery. I looked at some options like CouchDB but ultimately I needed a database of some sort that had native support for XQuery. While it looks like you can add on or hack in XQuery support to CouchDB, I preferred to keep things simple and went with eXist.
eXist allows you to store XML documents, with supporting DTDs and schemas, and access the collections using various mechanisms like REST or WebDAV. Once you have a number of XML documents in your repository, issuing an XQuery using the REST interface is pretty simple:
The above query will return a something like:
You can learn more about XQuery’s FLWOR structure here.
But eXist is more than just an XML store. By supporting XPath, XUpdate and XQuery Update, as well as custom extensions, eXist can be an application platform. I’m looking forward to working with XForms and Wicket in the future and I believe eXist will play heavily in that.