The following Java code snippets demonstrate how easy it is to run database commands, create collections, perform queries, etc. via the BaseX API.
In general, we recommend everyone to use our own APIs, as they offer better performance and are better supported by our core team. The use of the <code>XML:DB</code> and <code>XQJ</code> APIs is generally discouraged; instead: as these APIs do not utilize the client/server architecture of BaseX, we recommend everyone their use may lead to use our own APIs, as they offer better performance and are better supported by our core teamconflicting database access operations.
==Local Examples==
==XML:DB API Examples==
The XML:DB API does not communicate with the client/server architecture of BaseX.
This means that you should guarantee by yourself that only a single writing
process accesses the databases at the same time.
;[[XMLDBCreate]]
==XQJ API Example==
The XQJ API does not communicate with the client/server architecture of BaseX.
This means that you should guarantee by yourself that only a single writing
process accesses the databases at the same time.
;[[XQJQuery]]