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