# Erlsom

> XML parser for Erlang: SAX parsing and XML Schema based data binding

Source: https://talira.ai/catalog/erlsom-00ksk4wn
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 / erlang](https://talira.ai/categories/languages/erlang)
- Licence: LGPL-3.0-or-later[^2][^3]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (LGPL-3.0 or later).
- Free tier: yes[^2]
- Backed by: [Willem de Jong](https://talira.ai/orgs/willem-de-jong.md)

Erlsom is an Erlang library that parses and generates XML. It works as a SAX parser for documents of any size, as a simple DOM parser that produces the same 'simple form' as Xmerl, or as a data binder that validates a document against an XML Schema and turns it into Erlang records (and back). Documents can be fed in blocks from a stream, and it reads binaries directly, in Latin-1, UTF-8 or UTF-16.

## Links

- GitHub: https://github.com/willemdj/erlsom

## Problems it solves

- parse a large XML file in Erlang without loading it all into memory
- turn XML documents into Erlang records using the XSD I already have
- validate incoming XML against a schema in my Erlang service
- generate XML from Erlang data structures for a SOAP-style API

## Features

- SAX parser for documents of any size
- simple DOM mode with Xmerl's simple form
- XML Schema data binding to Erlang records, and back to XML
- streaming input in blocks of any size
- works directly on Latin-1, UTF-8 and UTF-16 binaries

## Limitations

- Some XML Schema constraints are accepted but not enforced while parsing: most simple types are read as strings, and key and unique constraints aren't supported[^1]

## Trust

Overall: 0.31 out of 1.
Signals: maintenance 0.27, adoption 0.49, momentum 0.11, community 0.62, backing 0.30, extensibility 0.00.

- latest release v1.5.2 22 months ago
- 270 GitHub stars
- 34 contributors
- backed by Willem de Jong

Warnings:

- last commit 4 months ago

## Alternatives

- [SweetXml](https://talira.ai/catalog/sweetxml-wcrr3x8m.md): Query XML in Elixir with XPath sigils
- [Saxy](https://talira.ai/catalog/saxy-5q4re2nw.md): Fast streaming XML SAX parser and encoder for Elixir
- [XML Builder (Elixir)](https://talira.ai/catalog/xml-builder-elixir-6kn7ps42.md): Generate XML in Elixir from tuples and builder functions

## Sources

[^1]: https://github.com/willemdj/erlsom (checked 28 Nov 2026)
[^2]: https://github.com/willemdj/erlsom/blob/master/src/erlsom.erl (checked 28 Nov 2026)
[^3]: https://github.com/willemdj/erlsom/blob/master/COPYING.LESSER (checked 28 Nov 2026)
