If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Tuesday, January 19, 2010

Exist database

I installed the Exist XML database yesterday and started experimenting with XQuery.

The first thing to do was creating a new collection. You can do this using the webinterface but we'll use the Exist Admin client which offers a command line interface.

Point your browser to http://localhost:8080/exist/index.xml and look in the menu under the section Administration for a orange Launch button.


exist:/db>mkcol products
exist:/db>cd products
exist:/db>put "D:\testdata\products/**/*.xml"


Now we can start using the Query Sandbox at http://localhost:8080/exist/sandbox/sandbox.xql

I wrote a little query which groups all products by the package they use and return the corresponding xml



The result looks like