Questions tagged [basex]

BaseX is a robust, high-performance XML database engine and a highly compliant XQuery 3.1 processor with full support of the W3C Update and Full Text extensions. It serves as excellent framework for building complex data-intensive web applications.

BaseX focuses on storing, querying, and visualizing large XML and JSON documents and collections. A visual frontend allows users to interactively explore data and evaluate queries in realtime (i.e., with each key click). BaseX is platform-independent and distributed under the free BSD License.

BaseX provides several methods of accessing a database and executing queries, among them:


Workflow (when using the native BaseX Java API)

More examples can be found in the BaseX Documentation

  • First of all, a BaseX database server must be running, which will process the client requests.
  • Each client provides a session class or script with methods to connect to and communicate with the database server. A socket connection will be established by the constructor, which expects a host, port, user name and password as arguments.
  • The execute() method is called to launch a database command. It returns the result or throws an exception with the received error message.
  • The query() method creates a query instance. Variables can be bound to that object, and the result can either be requested via execute(), or in an iterative manner with the more() and next() functions. If an error occurs, an exception will be thrown.
  • The create(), add(), replace() and store() method pass on input streams to the corresponding database commands.
  • To speed up execution, an output stream can be specified by some clients; this way, all results will be directed to that output stream.
  • Most clients are accompanied by some example files, which demonstrate how database commands can be executed or how queries can be evaluated.
486 questions
-1
votes
1 answer

XQuery delete if node has not child nodes

I would like to delete the "node2" nodes that have not child nodes. how can I do that 4 How can I do that with xquery>
vagelis
  • 326
  • 5
  • 18
-1
votes
1 answer

How to display the variables only once in Xquery?

I am trying to display three different variables at once. Here is what i have tried. let $totalmovies := count(//Movies/Movie) let $averagevariton:=(count(//Movies/Movie/secondtitles/OtherTitleName) +…
user2775042
  • 509
  • 2
  • 6
  • 21
-1
votes
1 answer

XQuery- concat or string-join?

Below is the XML Structure. Physics Physics
John
  • 2,820
  • 3
  • 30
  • 50
-2
votes
1 answer

Query returns no results in XQuery

I tried to query an XML file with XQuery in BaseX. Unfortunately the query returns no results. I think this is caused by incorrect declarations of the namespaces in the XQuery's prolog. Please see the code below for the namespaces used in the…
-2
votes
2 answers

How to parse the XML output from postgres as input for basex in Linux

How can I parse the XML output from Postgres as an input for Basex in Linux?
gph
  • 331
  • 1
  • 3
  • 11
-2
votes
1 answer

Error when get attributes with xquery in basex 7.9

This is the XML input: Everyday Italian Giada De Laurentiis 2005 30.00
Luke Le
  • 728
  • 1
  • 9
  • 24
1 2 3
32
33