# Saxy

> Fast streaming XML SAX parser and encoder for Elixir

Source: https://talira.ai/catalog/saxy-5q4re2nw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / parsing / xml](https://talira.ai/categories/developer-tools/parsing/xml), [languages / elixir](https://talira.ai/categories/languages/elixir)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [Cẩm Huỳnh](https://talira.ai/orgs/cam-huynh.md)

Saxy is an XML parser and encoder for Elixir that follows the XML 1.0 (Fifth Edition) specification. It parses with SAX events through a handler module, can stream large files, and can also parse a document into a simple DOM-like form. Its encoder builds XML from that simple form or from structs through the Saxy.Builder protocol. It has no XPath; its README points to Saxmerl for turning documents into the format [SweetXml](https://talira.ai/catalog/sweetxml-wcrr3x8m.md) reads. Install it from Hex as saxy.

## Links

- GitHub: https://github.com/qcam/saxy
- Docs: https://hexdocs.pm/saxy

## Problems it solves

- parse a huge XML file in Elixir without loading it all into memory
- build and encode XML from Elixir structs
- parse XML faster than xmerl in an Elixir app

## Features

- SAX parser with event handler callbacks
- streaming parsing of large XML files
- parse to a simple DOM-like form
- XML encoder with a Builder protocol for structs

## Limitations

- No XSD or DTD support: a DOCTYPE declaration is skipped.[^1]
- Only UTF-8 encoded documents are supported.[^1]

## Trust

Overall: 0.40 out of 1.
Signals: maintenance 0.54, adoption 0.49, momentum 0.17, community 0.54, backing 0.30, extensibility 0.00.

- last commit 30 days ago
- 13 commits in the last 90 days
- 295 GitHub stars
- 22 contributors
- backed by Cẩm Huỳnh

## Alternatives

- [SweetXml](https://talira.ai/catalog/sweetxml-wcrr3x8m.md): Query XML in Elixir with XPath sigils
- [XML Builder (Elixir)](https://talira.ai/catalog/xml-builder-elixir-6kn7ps42.md): Generate XML in Elixir from tuples and builder functions
- [Erlsom](https://talira.ai/catalog/erlsom-00ksk4wn.md): XML parser for Erlang: SAX parsing and XML Schema based data binding

## Sources

[^1]: https://github.com/qcam/saxy/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/qcam/saxy/blob/master/LICENSE.md (checked 29 Nov 2026)
