Fast and highly compliant XQuery processing lies at the heart of BaseX. Queries are optimized and rewritten for index access, and more than 40 built-in modules let you work with XML, JSON, CSV, HTML, files, databases and the web.
XQuery 4.0
The next version of the language is already available in BaseX. Your code gets shorter and easier to read: data structures can be written as compactly as in JSON, text and values are combined with templates, processing steps are chained into pipelines, and fallback values replace lengthy conditions. New types describe the structure of your data, and many new functions simplify everyday tasks. Even JSON can be navigated with paths, as in json-doc('cities.json')//city.
Smart Optimizer
Queries are statically analyzed, inlined and rewritten before they are evaluated, and database indexes are used automatically – no hints required. Repeated comparisons, as in joins, are indexed on the fly. Query plans show what happens behind the scenes.
Updates
Insert, delete, rename and replace nodes with the W3C XQuery Update Facility – in databases and in main-memory documents.
Full Text
Build high-performance search applications with the W3C XQuery Full Text extension: wildcards, stemming, case and diacritics sensitivity, scoring and stop words in many languages.
JSON, CSV, HTML
XQuery is not just for XML: Parse JSON, JSON Lines and CSV into XML or into maps and arrays, parse HTML into XML, and serialize your results in any of these formats. With Invisible XML, any other text format can be parsed by a grammar.
Integration
Call web services, query relational databases, send e-mails, transfer files via SFTP, and use Java libraries directly from XQuery.
Batteries Included
More than 40 modules cover everyday tasks: files, archives, validation, XSLT, cryptography, jobs and much more. Your own modules can be installed in the repository.