Skip to content
CAI
Software that uses CAICheck a score

kbrw/sweet_xml

64.7

Adequate · 15 November 2026

999

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

SweetXml is an Elixir library that provides XML parsing capabilities through the \~x sigil and streaming support for large documents. It manages XML processing via internal modules handling DTD rules and ETS storage, while offering various data casting modifiers and error types. The system includes security hardening against XXE attacks and maintains compatibility with modern Elixir versions through regular dependency and configuration updates.

Features

New sigil modifiers and streaming support for large XML documents

SweetXml now supports streaming large XML files via the new \stream\_tags/3\ function, which allows users to process tags without loading the entire document into memory. Additionally, the \\~x\ sigil has gained new modifiers: \k\ to return results as a Keyword list, \s\ to return values as strings, and \o\ to treat the path as optional (returning \nil\ if not found). The library also adds support for \xmlObj\ records and introduces new error types (\SweetXml.XmerlFatal\ and \SweetXml.DTDError\) for better error handling.

lib · high confidence

Behavioural changes

New internal module for DTD and ETS rules handling

A new internal module, \SweetXml.Options\, has been added to manage DTD (Document Type Definition) processing and ETS (Erlang Term Storage) table lifecycle. This module introduces logic to handle DTD options (\:all\, \:none\, \:internal\_only\, or specific entity allowlists) and integrates with the \:rules\ option to ensure proper setup and cleanup of ETS tables used during XML parsing, addressing previous issues with DTD exception handling and ETS management.

_lib/sweet\xml · high confidence

Removal of legacy Mix.Config configuration file

The legacy config/config.exs file, which utilized the deprecated Mix.Config module, has been removed from the project. This change eliminates the old configuration mechanism, likely as part of a migration to a newer configuration approach or to clean up unused boilerplate code.

config · high confidence

SweetXml 0.7.5 release with Elixir 1.20 warning fix and documentation updates

This release updates the library to version 0.7.5, primarily addressing a binary pattern match warning introduced in Elixir 1.20. It also includes maintenance improvements to the README, such as updated installation instructions and typo fixes, and introduces a \.formatter.exs\ file to standardize code formatting for the project.

(repo-wide) · high confidence

Test coverage

Added tests for streaming, security, and sigil features

Added test coverage for new and existing capabilities: streaming XML parsing (including port cleanup and error handling), security hardening against XXE and billion-laugh attacks via DTD options, and the new 'f' float cast modifier for the \~x sigil. Also added tests for namespace support and updated existing tests to reflect changes in return types (charlists vs strings) and sigil structure.

test · high confidence

Dependencies

Initial project setup and dependency configuration for SweetXml

The project mix.exs and mix.lock files have been initialized, establishing the base configuration for the SweetXml library. This includes setting the Elixir requirement to version 1.12 or higher, adding :xmerl and :logger as extra applications, and including ex\_doc as a development dependency for documentation generation. The lock file records the specific versions of ex\_doc and its transitive dependencies (earmark\_parser, makeup, makeup\_elixir, makeup\_erlang, nimble\_parsec) that will be used.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 65 → 65 (-0.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 99 → 95 (-4.1)
  • Architecture 69 → 69 (+0.0)
  • Maturity 53 → 53 (+0.0)
  • Readiness 69 → 69 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (2)

  • Edited copy of a member (37 corresponding lines) (lib/sweet_xml.ex)
  • Off-boarding risk: anonymized user #1

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

Survey your own repository

kbrw/sweet_xml 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 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d3ab75df0253d33b344f36b6d3a226cbc2c139d3 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.