PhoenixmlDb.Core
1.5.0
See the version list below for details.
dotnet add package PhoenixmlDb.Core --version 1.5.0
NuGet\Install-Package PhoenixmlDb.Core -Version 1.5.0
<PackageReference Include="PhoenixmlDb.Core" Version="1.5.0" />
<PackageVersion Include="PhoenixmlDb.Core" Version="1.5.0" />
<PackageReference Include="PhoenixmlDb.Core" />
paket add PhoenixmlDb.Core --version 1.5.0
#r "nuget: PhoenixmlDb.Core, 1.5.0"
#:package PhoenixmlDb.Core@1.5.0
#addin nuget:?package=PhoenixmlDb.Core&version=1.5.0
#tool nuget:?package=PhoenixmlDb.Core&version=1.5.0
PhoenixmlDb.Core
Core types, interfaces, and XDM (XQuery Data Model) implementation for PhoenixmlDb — a modern embedded XML/JSON document database for .NET.
What's in this package
- Database interfaces —
IDocumentDatabase,IContainer,IDocumentfor storing and retrieving XML/JSON documents - XDM node types —
XdmElement,XdmAttribute,XdmDocument, etc. — the W3C XQuery Data Model - Transaction model —
IReadTransaction,IWriteTransactionwith MVCC snapshot isolation - Index configuration — path, value, full-text, and metadata indexes for fast queries
- XML parser and serializer — parse XML into XDM trees and serialize back
- Atomic value types — dates, times, durations, and other XSD types with correct semantics
When to use this package
Directly: If you're building a storage provider, query engine integration, or tooling that works with XDM types.
Indirectly: This package is a dependency of PhoenixmlDb.XQuery, PhoenixmlDb.Xslt, and the CLI tools. You typically don't reference it alone unless you need the core types without query/transform capabilities.
Quick example
using PhoenixmlDb.Core;
using PhoenixmlDb.Xdm.Parsing;
// Parse XML into an XDM tree
var parser = new XmlDocumentParser();
var result = parser.Parse("<order><item>Widget</item></order>");
var doc = result.Document;
// Navigate the tree
var root = doc.Children[0]; // <order> element
Console.WriteLine(root.StringValue); // "Widget"
Related packages
| Package | Description |
|---|---|
| PhoenixmlDb.XQuery | XQuery 4.0 query engine |
| PhoenixmlDb.Xslt | XSLT 4.0 transformation engine |
| PhoenixmlDb.XQuery.Cli | xquery command-line tool |
| PhoenixmlDb.Xslt.Cli | xslt 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
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PhoenixmlDb.Core:
| Package | Downloads |
|---|---|
|
PhoenixmlDb.XQuery
XQuery 4.0 query engine for PhoenixmlDb |
|
|
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 |
|---|---|---|
| 1.6.7 | 129 | 8/24/2026 |
| 1.6.6 | 141 | 8/23/2026 |
| 1.6.5 | 137 | 8/21/2026 |
| 1.6.0 | 147 | 8/7/2026 |
| 1.5.0 | 97 | 8/6/2026 |
| 1.4.0 | 91 | 8/4/2026 |
| 1.3.0 | 351 | 7/27/2026 |
| 1.2.2 | 285 | 7/9/2026 |
| 1.2.1 | 148 | 7/8/2026 |
| 1.2.0 | 322 | 6/28/2026 |
| 1.1.9 | 323 | 6/17/2026 |
| 1.1.8 | 202 | 6/14/2026 |
| 1.1.7 | 138 | 6/9/2026 |
| 1.1.6 | 115 | 6/9/2026 |
| 1.1.5 | 316 | 5/23/2026 |
| 1.1.4 | 415 | 5/17/2026 |
| 1.1.3 | 165 | 5/14/2026 |
| 1.1.2 | 227 | 5/12/2026 |
| 1.1.1 | 356 | 5/9/2026 |
| 1.1.0 | 120 | 5/8/2026 |
Metadata becomes namespace-qualified end to end. **Breaking**: the metadata surfaces on
`IContainer`, `IWriteTransaction` and `IDocument` change shape, as does `AddMetadataIndex` and the
persisted index-config format.
### Why this is breaking rather than additive
The old surface keyed metadata by a bare string and valued it as `object`. Two applications sharing
a database could not both use a name as ordinary as `status`, and — more seriously — the engine had
no single answer for what a metadata value *was*. A stored value was JSON; an indexed value was
typed XDM. Those are different comparisons, so adding an index could change which documents a query
returned, not merely how quickly it found them. That is not a defect an additive API can fix: the
two encodings had to stop existing, which means the surface that produced them had to go.
### The three-tier surface
Metadata names are now `XdmQName` and values `XdmValue`, exposed at three levels of explicitness:
```csharp
// local name, resolved against the container's default namespace
await container.SetMetadataAsync("invoice.xml", "status", "pending");
// typed descriptor — namespace and CLR type come from the property
await container.SetMetadataAsync("invoice.xml", DcTerms.Creator, "lucas");
// fully explicit
await container.SetMetadataAsync("invoice.xml", qname, XdmValue.From("application/xml"));
```
`ContainerOptions.DefaultMetadataNamespace` sets what unqualified names resolve to, defaulting to
`https://schemas.phoenixml.dev/2026/meta`. Set it to your own application namespace and a common
name such as `status` can no longer collide with another application's.
`GetAllMetadataAsync` returns a `MetadataCollection` rather than
`IReadOnlyDictionary<string, object>`, so a caller can finally separate a namespace from a local
name — the old shape handed back `"ns:name"` as one unsplittable string. `GetMetadataByNamespaceAsync`
is new, and is served by a cursor range over the namespace key prefix rather than by fetching all of
a document's metadata and filtering it.
`DocumentOptions.Metadata` is now `IReadOnlyDictionary<XdmQName, XdmValue>?`.
### Indexes are qualified too
`AddMetadataIndex` takes an `XdmQName`. An index that cannot say *which* `status` it covers is the
same collision in a different place, and — because the store keys by qualified name — a bare-named
index would answer for documents it does not describe. With one key model on both sides, declaring
an index is a pure performance decision.
The persisted index configuration records the namespace alongside the local name. A configuration
written by an earlier version is rejected with an explanatory error rather than reinterpreted:
defaulting the namespace would silently point an index at a different key than the store writes.
### Removed
`IContainer.SetIndexedValuesAsync` is deleted rather than ported. Its default interface
implementation returned a completed task for any implementation without indexing, so a caller could
not distinguish a successful write from a no-op; it also stored its values as a single JSON array
while indexing each element separately. Multi-valued metadata returns as a deliberate feature or
not at all.
### Notes
Two parameter names could not be used as intended: CA1716 rejects `property` and `namespace` on
virtual and interface members because they collide with reserved keywords in other .NET languages.
They are `descriptor` and `namespaceId`. Positional call sites are unaffected.