TXFADataStructureSnapshot Type

TXFADataStructureSnapshot = TArray<TXFADataStructureNodeState> in HPDFXFADataStructure is the detached-forest value snapshot used by CaptureDetached and RestoreDetached

Node-state fieldMeaning
ParentIndex: Integer-1 for a detached root, otherwise the index of an earlier parent record
Identity: UInt64Original native identity for caller remapping, preserved as snapshot metadata
Name, Prefix, NamespaceURI, Value, InstructionTarget: AnsiStringExact UTF-8 element/content state
IsCDATA: BooleanCDATA treatment for ordinary text
ContentKind: TXFAXMLContentKindOrdinary text, comment or processing-instruction content kind
Attributes, NamespaceDeclarations: TArray<AnsiString>Ordered UTF-8 name=value entries, including an explicit empty default namespace reset

Records follow parent-before-child order; invalid parent references, aggregate size, node count or depth are rejected before replacing the existing detached forest

Restoration returns fresh objects and native identities, in the same order as the snapshot; callers retaining external aliases must remap them using that return array and their stored identities

The XFA widget runtime performs this remapping for its persistent script aliases as part of complete event rollback