25

I started playing around with XQuery. On [w3schools][1] its a good tutorial. I just have some problems: I cannot test the stuff on the site. I found an online XQuery ([this link][2]) and its nice to play with it, but if I would like to use the XQuery on an XML file thats not possible there. Any good and easy tools for only XQuery stuff for windows? If I search online I could find only big overloaded tools and the most of them are not free. I'm confused.

http://www.w3schools.com/xquery/default.asp
http://demo.exist-db.org/sandbox/sandbox.xql

Sofia
  • 771
  • 1
  • 8
  • 22
Revo
  • 255
  • 1
  • 3
  • 9

5 Answers5

31

Feel free to check out BaseX; it has an interactive frontend and is easy to use: http://basex.org/. You can turn on the option "Realtime Execution" to execute queries with each key click.

Christian Grün
  • 6,012
  • 18
  • 34
  • oh god, this is awesome. I tought basex is a standalone xml database with own rules. But now I see I can read any xml file and use xquery. Thats really nice. – Revo Feb 20 '12 at 18:12
  • http://www.xpathtester.com/xquery seem to be a good online alternative – user431529 Feb 15 '14 at 18:56
  • 2
    I highly recommend this software. At first the new GUI is not very user friendly in v8.1 (it took me a while to understand that to process an XML, you have to accept the indexation into an internal database, and that the Editor is the editor for both xml and xquery, you need to click + to add an empty file where you can input Xquery commands), but it's really great, fast, and even supports future standards such as XQUF http://www.w3.org/TR/xquery-update-10/ – gaborous Apr 09 '15 at 14:28
  • Also a great starting guide that helped me a lot: http://www.swennenhuis.nl/basexfordummies/BaseX_for_dummies.pdf And more can be found here: http://docs.basex.org/wiki/Getting_Started – gaborous Apr 09 '15 at 14:30
17

eXist-db is a great tool for learning XQuery: exist-db.org.

I'd start by checking out the Basic XQuery Examples on the eXist-db.org website. This suite of interactive tutorials shows you example XQuery source code based on already-loaded XML files, such as Shakespeare plays, and lets you run each query in the tutorial. You can also edit the sample queries to see how your changes alter the results. Just click on the "Edit" button beneath each source code sample, and it'll take you to eXide, a web-based interactive query editor, to edit the queries and run them. (As Adam notes in the comment below, eXide is a great tool in its own right for learning XQuery.) While you can't upload your own XML to the copy of eXide that runs on eXist-db.org, you can browse the included files (click on Open and log in with username guest and password guest) and craft sample queries against the files.

If you want to run queries on your own files, just download and install the eXist from exist-db.org; then you'll have eXide and the ability to upload your own XML for querying, as well as all of eXist's built-in documentation.

Another great set of tutorials on XQuery 3.0 (and now 3.1) is the XQuery 3.0 (and 3.1) Features demo.

If you have questions about eXist, I'd recommend joining the exist-open mailing list.

Joe Wicentowski
  • 5,159
  • 16
  • 26
  • 3
    You can also experiment with eXide using our demo site: https://demo.exist-db.org/exist/apps/eXide/index.html – adamretter Oct 21 '17 at 14:29
12

There are some XML databases that have a XQuery sandbox or IDE integrated. BaseX is a great example (see christians answer).

Another remarkable tool is eXist-db's eXide IDE. The version I'm linking to here lets you run queries from any browser, though for security reasons you can't upload files to their server. To use eXide on your own XML files, you can install eXist locally (it's quite easy), and then you can create or import XML files and test your XQueries on them.

Finally, there's Zorba's sandbox, offering some example queries and XML files.

Joe Wicentowski
  • 5,159
  • 16
  • 26
tohuwawohu
  • 13,268
  • 4
  • 42
  • 61
8

You should try Kernow

It's free and it's open source

They will ask you for donation after 100 times that you run it but it's up to you.

If it's non commercial, it's free

Marc
  • 16,170
  • 20
  • 76
  • 119
  • that looks good. The xquery sandbox ist here, now I have to figure out how to use it with an xml file ... – Revo Feb 20 '12 at 18:02
  • 1
    it says on the website I sent you that they have sandbox. "The sandboxes are areas where you can play with XSLT, XQuery and XML Schema. They are ideal for when you want to quickly try something out. They provide xml-based syntax highlighting and syntax checking as-you-type, and some code samples are available from the right-click menu" – Marc Feb 20 '12 at 18:08
  • It's not open source anymore. according to their website it now costs 10 euro. see http://andrewjwelch.com/kpro/ – user32882 Nov 21 '17 at 07:10
0

and to make the list complete don't forget about MarkLogic

http://community.marklogic.com/

MarkLogic Server is super fast, super scalable and also ships with a web based sandbox

Jim Fuller
  • 372
  • 3
  • 8