Inspect source structure without executing it

Edit source text and Tab out. CEM-ML imports it into a retained CEM document; cemml:inspect(document) shows its structure as tabular CEM-ML. The branch view reads that same document. XML, JSON, YAML and CSV share this path; these examples focus on XML and JSON.

Check any branches independently. Selected and a total show the selection without relying on color. Tab to a checkbox and press Space; Tab to a summary and press Enter or Space to collapse it. Collapsing preserves selection. Editing or reloading the source clears selection, even when the source text is unchanged.

Branch numbers follow source order. Namespace URIs distinguish names; "" marks an empty value. Namespace declarations stay in the CEM-ML source inspection but are excluded from branch attribute details. Whitespace, comments, CDATA and processing instructions are inspectable data. Scripts and xml-stylesheet instructions never execute.

The local-file example uses the shared http-request loader. It resolves URLs relative to the declaration and passes its retained CEM document to the same viewer. Choose No source to release it and select a file again to reload. Documents do not become JavaScript objects.

Keep this teaching sample small. Import currently permits 32 KiB, 64 levels and 4096 events/values; host and enclosing scope limits also bound rendering. Invalid input replaces the display with an error. Inspection is read-only; it does not edit the imported document.

See also

Table inspector: multiple selection and per-table sorting

Grouping and sorting tables ยท Request lifecycle ยท XPath and CEM-QL use cases ยท Data-island trees