PhoenixmlDb.XQuery
3.1.0
See the version list below for details.
dotnet add package PhoenixmlDb.XQuery --version 3.1.0
NuGet\Install-Package PhoenixmlDb.XQuery -Version 3.1.0
<PackageReference Include="PhoenixmlDb.XQuery" Version="3.1.0" />
<PackageVersion Include="PhoenixmlDb.XQuery" Version="3.1.0" />
<PackageReference Include="PhoenixmlDb.XQuery" />
paket add PhoenixmlDb.XQuery --version 3.1.0
#r "nuget: PhoenixmlDb.XQuery, 3.1.0"
#:package PhoenixmlDb.XQuery@3.1.0
#addin nuget:?package=PhoenixmlDb.XQuery&version=3.1.0
#tool nuget:?package=PhoenixmlDb.XQuery&version=3.1.0
PhoenixmlDb.XQuery
XQuery 4.0 query engine for PhoenixmlDb — query XML and JSON documents with the full power of XQuery.
Features
- Full XQuery 4.0 — FLWOR expressions, constructors, modules, user-defined functions
- XPath 4.0 — complete XPath implementation with 240+ built-in functions
- JSON support —
json-doc(),parse-json(), maps, arrays — query JSON natively - Full-text search —
contains textwith stemming, wildcards, proximity, scoring - Update Facility — insert, delete, replace, rename, transform expressions
- Type system — records, enums, union types (XQuery 4.0)
Quick example
using PhoenixmlDb.XQuery.Execution;
var engine = new QueryEngine();
// Simple query
var results = engine.ExecuteToListAsync(
"for $x in 1 to 10 where $x mod 2 = 0 return $x * $x");
// Query XML documents
var books = engine.ExecuteAsync(
"//book[price > 30]/title",
containerId);
Related packages
| Package | Description |
|---|---|
| PhoenixmlDb.Core | Core types and XDM data model (dependency) |
| PhoenixmlDb.Xslt | XSLT 4.0 transformation engine |
| PhoenixmlDb.XQuery.Cli | xquery command-line tool |
Documentation
Full documentation at phoenixml.dev
License
Apache 2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Antlr4.Runtime.Standard (>= 4.13.1)
- Lucene.Net (>= 4.8.0-beta00016)
- Lucene.Net.Analysis.Common (>= 4.8.0-beta00016)
- PhoenixmlDb.Core (>= 2.6.0)
-
net8.0
- Antlr4.Runtime.Standard (>= 4.13.1)
- Lucene.Net (>= 4.8.0-beta00016)
- Lucene.Net.Analysis.Common (>= 4.8.0-beta00016)
- PhoenixmlDb.Core (>= 2.6.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on PhoenixmlDb.XQuery:
| Package | Downloads |
|---|---|
|
PhoenixmlDb.Xslt
XSLT 4.0 transformation engine for PhoenixmlDb |
|
|
Phoenixml.Platform.Editor.Xml
XML/XSD vocabulary binding for Phoenixml.Platform — concrete IDocument and ITreeNodeProvider implementations against PhoenixmlDb.Core's XDM, XSD schema validation pipeline. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.2.0 | 277 | 11/18/2026 | |
| 3.1.0 | 356 | 11/13/2026 | |
| 3.0.0 | 243 | 11/4/2026 | |
| 2.9.0 | 509 | 10/15/2026 | |
| 2.8.0 | 263 | 10/9/2026 | |
| 2.7.0 | 173 | 10/7/2026 | |
| 2.6.0 | 170 | 10/6/2026 | |
| 2.5.1 | 386 | 10/1/2026 | |
| 2.5.0 | 124 | 10/1/2026 | |
| 2.4.1 | 427 | 9/28/2026 | |
| 2.4.0 | 168 | 9/28/2026 | |
| 2.3.0 | 146 | 9/28/2026 | |
| 2.2.0 | 220 | 9/24/2026 | |
| 2.1.0 | 349 | 9/17/2026 | |
| 2.0.0 | 370 | 9/15/2026 | |
| 1.8.0 | 340 | 9/14/2026 | |
| 1.7.0 | 728 | 9/11/2026 | |
| 1.6.15 | 249 | 9/9/2026 | |
| 1.6.14 | 250 | 9/7/2026 | |
| 1.6.13 | 194 | 9/4/2026 |
A security update for hosts that compile or run untrusted queries, and a new opt-in execution limit.
Requires PhoenixmlDb.Core 2.6.0.
### New: a limit on the length of a built string
`QueryExecutionLimits.MaxStringLength` (`int?`, default `null`: no limit) sets the longest string,
in UTF-16 code units, that one operation may build. An operation that goes past it fails with
`FOER0000`, the code of the other execution limits; a query can catch it with `try`/`catch`.
- It applies to `fn:concat`, `fn:string-join`, the `||` operator, string constructors,
`fn:codepoints-to-string`, `fn:replace`, `fn:serialize`, `fn:xml-to-json`, `fn:upper-case`,
`fn:lower-case`, `fn:encode-for-uri`, `fn:escape-html-uri`, `fn:iri-to-uri`,
`fn:normalize-unicode`, and the text that node constructors join.
- `fn:string-join`, `fn:replace`, string constructors and node constructors stop before the
string passes the limit, so they do not allocate the full string.
- The limit is per string, not per query. `MaxResultItems` limits materialized sequences.
- `QueryExecutionContext.CheckStringLength(long)` applies the same limit in host code and
extension functions.
A time limit alone cannot stop an expression that builds a very large string from no input. A
host that runs untrusted queries sets both.
### Security: import location hints with no base URI (GHSA-52r3-6pq9-42m5)
Only hosts that compile queries from untrusted parties are affected.
- **A relative import location hint with no base URI is not resolved against the working
directory.** In a query compiled with no base URI:
- `import schema ... at 'x.xsd'` gives XQST0059, with and without a `ResourcePolicy`. Under a
policy whose file roots hold the working directory, 3.0.0 resolves the hint against the
working directory and reads the file there.
- `import module ... at 'm.xqm'` gives XQST0059, with and without a `ResourcePolicy`. 3.0.0 reads
`m.xqm` from the working directory: with no policy, and under a policy whose file roots hold
the working directory.
With a base URI, a relative hint resolves against it. A host that compiles a query with no
base URI and imports a module or schema from the working directory by a relative hint gives the
working directory as the base URI (`CompilationOptions.BaseUri`). The `xquery` CLI does this.
A location that the host maps (`ExternalModuleLocations`, `ExternalModules`) or supplies through
its resource resolver does not change.
### Also in this release
- **A prefixed name parses in linear time** (#363): a query with 10,000 calls such as `fn:abs(1)`
compiles in 0.19 s.
- **A sequence of long paths compiles** (#360): the sum of the cardinality estimates is clamped,
so the cost model does not overflow.
- **The library builds with .NET SDK 10.0.401 and later** under warnings as errors: three
`default(T)` expressions that IDE0034 reports are simplified. No compiled code changes.