PhoenixmlDb.XQuery
INodeProvider
Provides node resolution for the XQuery execution engine.
#INodeProvider
Namespace: PhoenixmlDb.XQuery
Provides node resolution for the XQuery execution engine.
This is an extension point that allows the XQuery engine to load XDM nodes from any storage backend. Implementations can load nodes from PhoenixmlDb's built-in storage, in-memory documents, a remote service, or any other source.
Most developers do not need to implement this interface directly — the built-in PhoenixmlDb storage layer provides its own implementation. Implement it when integrating the XQuery engine with a custom data source or when building a virtual/lazy-loading node store.
#Example
// Simple in-memory node provider:
var provider = new DelegateNodeProvider(id => nodeCache.TryGetValue(id, out var node) ? node : null);
var engine = new QueryEngine(nodeProvider: provider);
#Methods
#GetNode(PhoenixmlDb.Core.NodeId)
Loads a node by its storage identifier.
Parameters:
-
nodeId— The identifier of the node to load.
Returns: The XDM node, or null if no node exists with the given identifier.
#See also
-
DelegateNodeProvider -
QueryEngine