The following Java code snippets demonstrate how easy it is to run database commands, create collections, perform queries, etc. via the BaseX API. Most examples are taken from our [https://github.com/BaseXdb/basex-examples/tree/master/src/main/java/org/basex/examples basex-examples] repository, in which you will find some more use cases.
{{Mark|Since 7.2.1}}, our Our current XQJ API is based on Charles Foster’s [http://xqj.net/basex/ XQJ implementation], which fully utilized the client/server architecture of BaseX.
Note that the older {{Code|XML:DB}} API can only be used in embedded mode.