toVar
Convert a CdmNode to a var value (lossy — strips metadata).
This function recursively converts a CdmNode tree into a lightweight ddn.var tree, discarding all formatting metadata, source locations, and comments. TAG nodes are represented as objects with (#name, #ns, #values, and @attr keys).
Parameters
node | The CdmNode to convert. |
Returns
A var representing the node's value without metadata.
Convert a CdmDocument to a var value.
Delegates to toVar on the document's root node.
Parameters
doc | The CdmDocument to convert. |
Returns
A var representing the document's root node.