PhoenixmlDb.Core
XdmNode
Abstract base class for all XDM (XPath Data Model) nodes, representing the in-memory structure of XML and JSON documents as defined by the W3C XDM specification.
#XdmNode
Namespace: PhoenixmlDb.Xdm.Nodes
Abstract base class for all XDM (XPath Data Model) nodes, representing the in-memory structure of XML and JSON documents as defined by the W3C XDM specification.
The XDM defines seven node kinds: , , , , , , and . Each is represented by a concrete subclass of XdmNode. Navigation: Every node except the document root has a property pointing to its containing node. To access children or attributes, cast the node to or and use their child/attribute lists. Children and attributes are referenced by , which must be resolved through a node lookup function (e.g., the one provided by the storage layer). Values: returns the text content of the node as defined by the XDM dm:string-value accessor. For element and document nodes, this is the concatenation of all descendant text nodes. returns the schema-typed value (dm:typed-value), which is xs:untypedAtomic for unvalidated content. Identity: The property is a storage-assigned identifier used for efficient node lookup and parent/child references. It is not related to the xml:id attribute or the XDM dm:is identity function.
#Properties
| Name | Description |
|---|---|
BaseUri
|
The base URI for this node (dm:base-uri), used for resolving relative URIs. |
CopySourceBaseUri
|
Base URI inherited from the source element during xsl:copy operations. |
Document
|
The identifier of the document that contains this node. |
DocumentOrderKey
|
The value key that totally orders and identifies this node in XDM document order: the pair (TreeOrdinal, Id). |
Id
|
Unique storage identifier for this node, assigned during parsing or construction. |
IsAttribute
|
Returns true if this node is an node. |
IsComment
|
Returns true if this node is an node. |
IsDocument
|
Returns true if this node is a node. |
IsElement
|
Returns true if this node is an node. |
IsNamespace
|
Returns true if this node is an node. |
IsProcessingInstruction
|
Returns true if this node is an node. |
IsText
|
Returns true if this node is an node. |
NodeKind
|
The kind of this node (element, attribute, text, etc.). |
NodeName
|
The qualified name of this node (dm:node-name), or null for node kinds that have no name (text, comment, document). |
Parent
|
The parent node's identifier, or null for document nodes (which have no parent). |
SourceColumn
|
Column number where this node starts in its source document, 1-based. Zero means "no source position" (synthesized node). |
SourceLine
|
Line number where this node starts in its source document, 1-based. Zero means "no source position" (synthesized node). |
StringValue
|
The string value of this node, as defined by the XDM dm:string-value accessor. |
TreeOrdinal
|
Store-global monotonic ordinal identifying the tree (parsed document or constructed subtree) this node belongs to, used as the primary key of XDM document order. |
TypedValue
|
The typed value of this node, as defined by the XDM dm:typed-value accessor. |
#Methods
#CompareDocumentOrder(PhoenixmlDb.Xdm.Nodes.XdmNode,PhoenixmlDb.Xdm.Nodes.XdmNode)
Compares two nodes in XDM document order using the pair (TreeOrdinal, Id).
Parameters:
-
a— The first node. -
b— The second node.
Returns: A negative value if precedes , a positive value if it follows, and zero if they occupy the same position (same tree and same node id).
This is a total order: is compared first (grouping nodes by their originating tree via a store-global counter), then orders nodes within a tree. It is the single canonical comparison for all document-order sort, union, intersect, except, and <</>> sites.
#Is(PhoenixmlDb.Core.XdmNodeKind)
Returns true if this node has the specified .
Parameters:
-
kind— The node kind to test against.
#ToString
Returns , providing the XDM string value of this node.