Browsers have a DOMParser; Node, Bun and Deno don't, so pass one there
(any standards-compliant XML implementation, e.g. happy-dom's; linkedom's
ignores XML namespaces, so it can't read SCXML).
code: "SCXML_NO_DOMPARSER" when no parser is
available, code: "SCXML_PARSE" when the text isn't well-formed XML or
the parser doesn't implement XML namespaces.
Parse SCXML text into its
<scxml>element.Browsers have a
DOMParser; Node, Bun and Deno don't, so pass one there (any standards-compliant XML implementation, e.g. happy-dom's; linkedom's ignores XML namespaces, so it can't read SCXML).