Skip to content
CAI
Software that uses CAICheck a score

qcam/saxy

71.5

Strong · 18 September 2026

2.8k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Saxy is an Elixir library that provides high-performance XML parsing and encoding capabilities. It features a streaming parser optimized for incremental data processing, alongside utilities to convert XML into simple nested tuple structures or accumulate events for custom handling. The system also includes an encoder and builder protocol to serialize Elixir data structures back into XML strings.

Features

Added benchmarking suite for XML parsing and encoding

A new \bench\ directory has been introduced containing a comprehensive performance benchmarking suite. This includes configuration for code formatting and build artifacts, a noop handler for SAX events, and sample XML files (including a large 30MB dataset and Hacker Noon RSS feeds) for testing. The suite uses Benchee to benchmark the performance of Saxy, Erlsom, Exomler, and Xmerl across four distinct scenarios: binary string parsing, simple form parsing, streaming file parsing, and XML encoding (including builder patterns for Saxy and XmlBuilder).

bench · high confidence

Introduce XML encoder and builder protocol

Saxy now includes an XML encoder (Saxy.Encoder) that converts simple-form data structures back into XML strings, handling prolog generation, attribute escaping, and content serialization. Additionally, a new Saxy.Builder protocol allows users to derive automatic XML generation from Elixir structs, enabling seamless conversion of application data into XML content via the @derive macro.

lib/saxy · high confidence

Introduce simple form handler with CDATA support

A new handler module for the simple form parsing capability has been added, implementing the Saxy.Handler behaviour to convert XML streams into a nested tuple structure. This implementation specifically distinguishes CDATA sections as a separate event type, storing them as {:cdata, content} tuples within the element's content list, while standard character data is accumulated as strings.

_lib/saxy/simple\form · high confidence

New accumulating handler for stream transformations

Saxy now includes a new \Saxy.Handler.Accumulating\ module that collects SAX events into a list, designed to be used with stream transformations. This handler implements the \Saxy.Handler\ behaviour and allows users to easily accumulate parsed events for further processing or conversion.

lib · high confidence

Behavioural changes

New optimized parser implementation with streaming support

The XML parser in lib/saxy/parser has been replaced with a new implementation that introduces a builder-based architecture for generating optimized parsing code. This change adds support for streaming XML parsing via a new lookahead macro and edge-ngram matching, allowing the parser to handle data chunks incrementally. It also includes improved error reporting through a dedicated ParseError struct and utility functions for encoding validation and character length computation, resulting in better performance and more robust handling of XML prologs and declarations.

lib/saxy/parser · high confidence

Removed default application configuration file

The default \config/config.exs\ file has been removed from the project. This file previously contained boilerplate comments and the \use Mix.Config\ directive but no active configuration settings. Its removal simplifies the project structure by eliminating unused configuration scaffolding, relying instead on other configuration mechanisms (such as \mix.exs\ or environment-specific files) for application setup.

config · high confidence

Update CHANGELOG and project configuration for v1.6.1

The CHANGELOG has been updated to document the v1.6.1 release, which addresses handling of UTF-8 characters split across chunks. Additionally, the project's Elixir formatter configuration (.formatter.exs) has been updated to include the :stream\_data dependency, set a line length of 130, and define local functions without parentheses, while the .gitignore file now excludes /tmp directories.

(repo-wide) · high confidence

Test coverage

Added test coverage for Saxy builder, encoder, partial parsing, and simple form; Added test support utilities and handler implementations; Added unit tests for XML element and prolog parsing; Expanded test coverage for XML parsing, streaming, and encoding.

Dependencies

Update minimum Elixir version to 1.12 and add development dependencies

The project now requires Elixir 1.12 or higher, raising the minimum version from 1.6. Additionally, the \mix.exs\ configuration has been updated to include \ex\_doc\ and \stream\_data\ as development dependencies, and the package metadata (description, maintainers, licenses, links) and documentation settings have been added to the project definition.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 72.

Lenses

  • Code Health 100
  • Architecture 100
  • Maturity 59
  • Readiness 65
  • Security 100

Changes since last survey

  • 190 commits — 166 feature/other, 24 fixes

By area

  • lib/saxy — 80 commits
  • (root) — 76 commits
  • test/saxy — 11 commits
  • .github/workflows — 7 commits
  • lib/saxy.ex — 3 commits
  • test/support — 3 commits
  • (repo) — 2 commits
  • benches/lib — 2 commits
  • test/saxy_test.exs — 2 commits
  • bench/samples — 1 commit
  • benches/saxy_bench — 1 commit
  • config/config.exs — 1 commit
  • guides/getting-started-with-sax.md — 1 commit

Notable commits

  • fix: Fix "parse_string" examples (#18)
  • fix: Fix Bench link in README.md (#92)
  • fix: Fix OTP 20 version on CI (#120)
  • fix: Fix Saxy.Builder implementation of primitive types (#76)
  • fix: Fix a bug in XML.element/3 typespec
  • fix: Fix a bug when buffering with a trailing UTF-8 byte
  • fix: Fix a documentation bug
  • fix: Fix a flaky case in property test
  • fix: Fix broken SaxMerl link in README.md (#81)
  • fix: Fix broken Saxy.Encoder doctests (#60)
  • fix: Fix compile time deprecation warnings (#135)
  • fix: Fix definition of Saxy.XML.content type (#82)
  • fix: Fix document error in streaming parsing
  • fix: Fix fast return bug in streaming parsing
  • fix: Fix flaky property-based test
  • fix: Fix incorrect example in README
  • fix: Fix integer typespecs (#58)
  • fix: Fix malformed typespec in partial parser
  • fix: Fix specs and remove 'dead' code (Dialyxir) (#72)
  • fix: Fix v1.4.0 release date (#93)
  • …and 170 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

qcam/saxy was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4d31f945a49a57b663e7f6f0e732c1f3e6c4f76b — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.