kbrw/sweet_xml
57.4
Adequate · 18 September 2026
999
lines of production code
Elixir
primary language
1
measurement over time
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 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 57.
Lenses
- Code Health 99
- Architecture 69
- Maturity 38
- Readiness 67
- Security 100
Changes since last survey
- 164 commits — 141 feature/other, 23 fixes
By area
- (root) — 79 commits
- (repo) — 41 commits
- lib/sweet_xml.ex — 29 commits
- lib/sweet_xml — 4 commits
- test/sweet_xml_test.exs — 4 commits
- doc/SweetXml.html — 2 commits
- .github/workflows — 1 commit
- config/config.exs — 1 commit
- doc/404.html — 1 commit
- doc/fonts — 1 commit
- doc/js — 1 commit
Notable commits
- fix: Bugfix to ensure get_current_entities/2 returns a list when %SweetXpath indicates so.
- fix: Fix charlist warnings for Elixir 1.17
- fix: Fix compilation warnings
- fix: Fix deprecation warnings for Elixir 1.15 (& require Elixir 1.12+) (#94)
- fix: Fix encoding error
- fix: Fix spacing issue for the transform_by examples.
- fix: Fix stream :halt handling
- fix: Fix xml entities splitting strings
- fix: Fixes missing parentheses warnings from piping, for Elixir v1.2.
- fix: Merge branch 'fix-docs-transform-by-examples' of https://github.com/schneiderderek/sweet_xml into schneiderderek-fix-docs-transform-by-examples
- fix: Merge branch 'schneiderderek-fix-docs-transform-by-examples'
- fix: Merge pull request #102 from elfenlaid/fix-charlist-warnings
- fix: Merge pull request #20 from aaronjensen/fix-xml-entities-splitting-strings
- fix: Merge pull request #26 from seantanly/bugfix
- fix: Merge pull request #49 from tomciopp/fix-elixir-1-5-warnings
- fix: Merge pull request #7 from awetzel/stream-fix-halt
- fix: Merge pull request #74 from fusillicode/fusillicode-fix-typos-and-doc
- fix: Merge pull request #89 from kianmeng/fix-typos-and-prettify-md-yml-files
- fix: actual fix :eyes: + tests
- fix: chore(Elixir 1.5): Fix deprecation warnings
- …and 144 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
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 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 d3ab75df0253d33b344f36b6d3a226cbc2c139d3 — 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.