Statifier.Parser.SCXML (statifier v1.9.0)

View Source

Parser for SCXML documents using Saxy SAX parser with accurate location tracking.

Summary

Functions

Parse an SCXML string into a Statifier.Document struct using Saxy parser.

Functions

parse(xml_string, opts \\ [])

@spec parse(
  String.t(),
  keyword()
) :: {:ok, Statifier.Document.t()} | {:error, term()}

Parse an SCXML string into a Statifier.Document struct using Saxy parser.

Options

  • :relaxed - Enable relaxed parsing mode (default: true)
    • Auto-adds xmlns and version attributes if missing
    • Preserves line numbers by skipping XML declaration by default
  • :xml_declaration - Add XML declaration in relaxed mode (default: false)
    • Set to true to add XML declaration (shifts line numbers by 1)