qcam

qcam

Saxy: A fast, easy-to-use and XML 1.0 compliant SAX parser in Elixir

Yo Elixir fellows!

I have just released Saxy – as the name might have already implied: It is a new XML SAX parser.

What is so great about Saxy?

TL;DR It is fast, easy to use, streamy and compliant to XML 1.0.

Saxy is quite fast. Benchmarking results show that it could parse up to 15.37 MB of binary per second. In comparison to other similar libraries, Saxy is usually 1.4 times faster than Erlsom and 4.46 times faster than xmerl. The speed is particularly noticeable with 4.35 times faster than Erlsom when parsing large and deeply nested XML.

Saxy is easy to use. It emits binary instead of characters list like xmerl and Erlsom, which makes it extremely easy to use. Like Erlsom, Saxy provides a function to export XML documents into “simple form” format.

Saxy supports streaming parsing in a native Elixir way. Saxy accepts passing File.Stream and Stream as the input, which means you are in full control of how the file/binary chunks will be streamed.

Saxy is XML 1.0 compliant. However, no Doctype Definition and external entities are supported at the moment.

I also published a blog post about how the library was built.

Feedbacks, suggestions, PRs are welcome :bowing_man:! Thank you!

References:

  1. Benchmark suite
  2. XML 1.0
  3. Erlsom

Where Next?

Popular in Announcing Top

tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ab...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
ityonemo
Currently just starting out on a new mini-project - getting zig NIFs to run in elixir. https://github.com/ityonemo/zigler The idea here...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
zoltanszogyenyi
Hey everyone :waving_hand: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-s...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43757 214
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement